I am working on a java application with a JFileChooser and the user is able to switch languages.
Locale.setDefault( Locale.ENGLISH );
JFileChooser chooser = new JFileChooser();
chooser.showOpenDialog( null );
Locale.setDefault( Locale.CHINA );
JFileChooser.setDefaultLocale( Locale.CHINA );
JFileChooser chinese_chooser = new JFileChooser();
chinese_chooser.showOpenDialog( null );
The second file chooser to appear is in Chinese except for the "All Files" string in the drop down box. If I comment out the first section of code the file chooser appears correctly with all the strings translated.
Is this a bug in java or do I need to set the locale somewhere else?
How can I get the translated file chooser to appear correctly?
UIManager.put("FileChooser.acceptAllFileFilterText",UIManager.get( "FileChooser.acceptAllFileFilterText", Locale.CHINA ));
– Colburn