Solved Attempting to set default language with 'VirtualKeyboarSettings.local' property
-
I am attempting to set the default language for the Qt Virtual Keyboard using the
VirtualKeyboardSettings.local
property, for instance:InputPanel{ id: virtualKeyboard width: parent.width anchors.centerIn: parent visible: true onActiveChanged: { if(activeFocus){ switch(langIndex){ case 0: VirtualKeyboardSettings.local = "en_US" break; case 1: VirtualKeyboardSettings.local = ///Here I want Espanol break; case 2: VirtualKeyboardSettings.local = ///Here I want Francais break; case 3: VirtualKeyboardSettings.local = ///Here I want Polish break; } } } }
In the layouts directory I see that each language is given an abbreviation: ar_AR, bg_BG, cs_CZ etc... however, I am not sure what languages those abbreviations refer too. Is there a document somewhere that can tell me which is which?
I tried printing the list of
availableLocales
to the console:console.log(VirtualKeyboardSettings.availableLocales)
but this just prints an empty list. However, the keyboard itself has all the of different locals available for me to switch between so I am not sure how it could be empty. In general, this doesn't seem to be working. Is this not how you use the
.local
property or is there some switch I need to enable before I can use the.local
property that I am not aware of? -