on xenial help sign in
Set current layout when setting language
commita07176bdb8c783c8cbc6572ee910fbbbc464c84e authorMichael Terry <michael.terry@canonical.com> dateThu 17 Mar 2016, 18:07 (11 years ago) parent620e839
1 file changed+8−1
qml/Wizard/Pages/10-welcome.qml+8−1
qml/Wizard/Pages/10-welcome.qml+8−1
@@ -31,6 +31,10 @@ LocalComponents.Page {
3131 id: plugin
3232 }
3333
34+ OnScreenKeyboardPlugin {
35+ id: oskPlugin
36+ }
37+
3438 function init()
3539 {
3640 var detectedLang = "";
@@ -153,8 +157,11 @@ LocalComponents.Page {
153157 enabled: languagesListView.currentIndex != -1
154158 onClicked: {
155159 if (plugin.currentLanguage !== languagesListView.currentIndex) {
160+ var locale = plugin.languageCodes[languagesListView.currentIndex];
161+ var language = locale.split("_")[0].split(".")[0];
156162 plugin.currentLanguage = languagesListView.currentIndex;
157− System.updateSessionLocale(plugin.languageCodes[plugin.currentLanguage]);
163+ oskPlugin.setCurrentLayout(language);
164+ System.updateSessionLocale(locale);
158165 }
159166 i18n.language = plugin.languageCodes[plugin.currentLanguage]; // re-notify of change after above call (for qlocale change)
160167