File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ public class I18n {
25
25
static protected void init (String language ) {
26
26
// there might be a null pointer exception ... most likely will never happen but the jvm gets mad
27
27
try {
28
- locale = new Locale (language );
28
+ if (language == null || language .trim ().isEmpty ()) locale = Locale .getDefault ();
29
+ else locale = new Locale (language );
29
30
i18n = ResourceBundle .getBundle ("processing.app.Resources" , locale );
30
31
} catch (java .lang .NullPointerException e ) {
31
32
}
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ public class Preferences {
112
112
113
113
// language related arrays, please read notes later, where the language combo box is introduced
114
114
String [] languages = {
115
+ _ ("System Default" ),
115
116
_ ("Catalan" ),
116
117
_ ("Chinese Simplified" ),
117
118
_ ("Chinese Taiwan" ),
@@ -133,6 +134,7 @@ public class Preferences {
133
134
_ ("Russian" ),
134
135
_ ("Spanish" )};
135
136
String [] languagesISO = {
137
+ "" ,
136
138
"ca" ,
137
139
"zh_cn" ,
138
140
"zh_tw" ,
You can’t perform that action at this time.
0 commit comments