@@ -61,6 +61,21 @@ LocalComponents.Page {
6161 }
6262 }
6363
64+ function applyOSKSettings(locale) {
65+ var language = locale.split("_")[0].split(".")[0];
66+ var oskLanguage = language;
67+
68+ if (language === "zh") { // special case for Chinese, select either simplified or traditional
69+ if (locale.substr(0, 5) === "zh_CN" || locale.substr(0,5) === "zh_SG") {
70+ oskLanguage = "zh-hans"; // Chinese Simplified
71+ } else {
72+ oskLanguage = "zh-hant"; // Chinese Traditional
73+ }
74+ }
75+
76+ oskPlugin.setCurrentLayout(oskLanguage);
77+ }
78+
6479 // splash screen (this has to be on the first page)
6580 Image {
6681 id: splashImage
@@ -158,9 +173,8 @@ LocalComponents.Page {
158173 onClicked: {
159174 if (plugin.currentLanguage !== languagesListView.currentIndex) {
160175 var locale = plugin.languageCodes[languagesListView.currentIndex];
161− var language = locale.split("_")[0].split(".")[0];
162176 plugin.currentLanguage = languagesListView.currentIndex;
163− oskPlugin.setCurrentLayout(language);
177+ applyOSKSettings(locale);
164178 System.updateSessionLocale(locale);
165179 }
166180 i18n.language = plugin.languageCodes[plugin.currentLanguage]; // re-notify of change after above call (for qlocale change)
@@ -169,8 +183,7 @@ LocalComponents.Page {
169183 (root.simManager0.present && root.simManager0.ready) || (root.simManager1.present && root.simManager1.ready) ||
170184 root.seenSIMPage) { // go to next page
171185 pageStack.next();
172− }
173− else {
186+ } else {
174187 pageStack.load(Qt.resolvedUrl("sim.qml")); // show the SIM page
175188 }
176189 }