How to enable other locales in Virtual Keyboard plugin



  • Hello,

    I have to change/customize the layout of the virtual keyboard, currently I did:

    1. As a layout to my language doesn t exist, I copied and merged the files from en_GB and pt_PT to create the pt_BR locale.
    2. Modified the layout to my needs.
    3. Added rule in the virtualkeyboard.pro file to handle my locale (merge of en_GB and pt_PT):

    contains(CONFIG, lang-pt.BR) {
    LAYOUT_FILES +=
    content/layouts/pt_BR/dialpad.qml
    content/layouts/pt_BR/digits.qml
    content/layouts/pt_BR/handwriting.qml
    content/layouts/pt_BR/numbers.qml
    content/layouts/pt_BR/symbols.qml
    t9write: LAYOUT_FILES +=
    content/layouts/pt_BR/handwriting.qml
    }

    1. Compiled and installed it with: qmake "CONFIG += lang-all lang-pt.BR", make, make install.

    2. Recompiled my project, adding to the InputPanel:

      Component.onCompleted: {
      
           VirtualKeyboardSettings.locale = "pt_BR" 
           console.log("Locale after changing it: " + VirtualKeyboardSettings.locale)
                   VirtualKeyboardSettings.customLayoutsOnly = true
           console.log("locales available: " + VirtualKeyboardSettings.availableLocales)
       }
      
    3. Executed my program, with result in console:

    qml: Locale after changing it: pt_BR
    qml: locales available:

    As you can see, it has no locale available to install.

    I think that qmake / make in some sort is not adding the locale files when compiling.

    Can someone help?


Log in to reply