mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Adding "system default" (default locale) option for IDE language.
That is, if the editor.languages.current preference is empty (or missing), use the default system locale.
This commit is contained in:
parent
c03ea000a2
commit
b816571772
@ -25,7 +25,8 @@ public class I18n {
|
||||
static protected void init (String language) {
|
||||
// there might be a null pointer exception ... most likely will never happen but the jvm gets mad
|
||||
try {
|
||||
locale = new Locale(language);
|
||||
if (language == null || language.trim().isEmpty()) locale = Locale.getDefault();
|
||||
else locale = new Locale(language);
|
||||
i18n = ResourceBundle.getBundle("processing.app.Resources", locale);
|
||||
} catch (java.lang.NullPointerException e) {
|
||||
}
|
||||
|
@ -112,6 +112,7 @@ public class Preferences {
|
||||
|
||||
// language related arrays, please read notes later, where the language combo box is introduced
|
||||
String[] languages = {
|
||||
_("System Default"),
|
||||
_("Catalan"),
|
||||
_("Chinese Simplified"),
|
||||
_("Chinese Taiwan"),
|
||||
@ -133,6 +134,7 @@ public class Preferences {
|
||||
_("Russian"),
|
||||
_("Spanish")};
|
||||
String[] languagesISO = {
|
||||
"",
|
||||
"ca",
|
||||
"zh_cn",
|
||||
"zh_tw",
|
||||
|
Loading…
x
Reference in New Issue
Block a user