-
Bug
-
Resolution: Not an Issue
-
P3
-
11, 17, 21, 25
ADDITIONAL SYSTEM INFORMATION :
Mac OS 15.3, Java SE 11.*, JDK 22.*, OpenJDK 11.*...
Bug not present on Windows and Linux
A DESCRIPTION OF THE PROBLEM :
While Locale.getDefault() returns "fr_BE", Swing components remain in English. However, some Locale's are working correctly, such as Locale.GERMANY (correct translation of buttons and other components)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See test case below
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The buttons and other Swing components should be translated in French when Locale.setDefault(Locale.FRANCE) is called.
ACTUAL -
Components are correctly translated when Locale.setDefault(Locale.GERMANY) is called but not when Locale.setDefault(Locale.FRANCE) is called.
---------- BEGIN SOURCE ----------
import java.util.Locale;
import javax.swing.JOptionPane;
public class Test {
public static void main(String[] args) {
System.out.println(Locale.getDefault());
Locale.setDefault(Locale.FRANCE); // Doesn't work
//Locale.setDefault(Locale.GERMANY); // Works !
JOptionPane.showConfirmDialog(null, "Default locale: " + Locale.getDefault());
}
}
---------- END SOURCE ----------
Mac OS 15.3, Java SE 11.*, JDK 22.*, OpenJDK 11.*...
Bug not present on Windows and Linux
A DESCRIPTION OF THE PROBLEM :
While Locale.getDefault() returns "fr_BE", Swing components remain in English. However, some Locale's are working correctly, such as Locale.GERMANY (correct translation of buttons and other components)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See test case below
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The buttons and other Swing components should be translated in French when Locale.setDefault(Locale.FRANCE) is called.
ACTUAL -
Components are correctly translated when Locale.setDefault(Locale.GERMANY) is called but not when Locale.setDefault(Locale.FRANCE) is called.
---------- BEGIN SOURCE ----------
import java.util.Locale;
import javax.swing.JOptionPane;
public class Test {
public static void main(String[] args) {
System.out.println(Locale.getDefault());
Locale.setDefault(Locale.FRANCE); // Doesn't work
//Locale.setDefault(Locale.GERMANY); // Works !
JOptionPane.showConfirmDialog(null, "Default locale: " + Locale.getDefault());
}
}
---------- END SOURCE ----------