3 |
import java.util.List; |
import java.util.List; |
4 |
import java.util.Locale; |
import java.util.Locale; |
5 |
|
|
6 |
|
import javax.swing.JColorChooser; |
7 |
|
import javax.swing.JComponent; |
8 |
|
import javax.swing.JFileChooser; |
9 |
|
import javax.swing.JOptionPane; |
10 |
|
|
11 |
import org.apache.log4j.Logger; |
import org.apache.log4j.Logger; |
12 |
|
|
13 |
/** |
/** |
53 |
throw new IllegalArgumentException("'"+activeLang+"' is not a valid ISO language code."); |
throw new IllegalArgumentException("'"+activeLang+"' is not a valid ISO language code."); |
54 |
} |
} |
55 |
|
|
56 |
Locale.setDefault(new Locale(activeLang)); |
Locale newLocale = new Locale(activeLang); |
57 |
|
Locale.setDefault(newLocale); |
58 |
|
|
59 |
|
/** |
60 |
|
* Setting default locale for Swing JComponents to work around bug |
61 |
|
* http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4884480 |
62 |
|
*/ |
63 |
|
JComponent.setDefaultLocale(newLocale); |
64 |
|
|
65 |
Translation.activeLang = activeLang; |
Translation.activeLang = activeLang; |
66 |
log.info("Translation-system switched to "+activeLang); |
log.info("Translation-system switched to "+activeLang); |
67 |
} |
} |