I have a Java application that supports multiple languages. When I change the language (in the settings dialog), the language of the entire application changes, including the language of the Swing components, such as JFileChooser . This is great for English, Spanish and French. But when I choose Dutch, the language of the Swing components ( JFileChooser , confirmation dialogs, etc.) changes to English.
Below is the code that changes the language to Dutch. Note: for other languages I use the same code (except for the string "NL" , of course), and it works fine.
Locale locale = new Locale("nl"); Locale.setDefault(locale); JComponent.setDefaultLocale(locale);
I also tried to create a locale using new Locale("nl", "BE"); and new Locale("nl", "NL"); but none of them worked. Is there a problem with the Dutch language? Or am I doing something wrong here?
source share