Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android keyboard stays English latin when it should be Hindi

Android keyboard stays English latin when it should be Hindi

Scheduled Pinned Locked Moved Solved Mobile and Embedded
androidqmlqt5.11virtualkeyboardlanguagechange
2 Posts 1 Posters 973 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    _.-rFLo_.-
    wrote on 22 Sept 2018, 14:43 last edited by _.-rFLo_.-
    #1

    Hi there,
    I am developing a bilingual (English/Hindi) Android app with Qt.5.11 and QML.
    The language switch is established by setting the locales "en_IN" or "hi_IN" of a Translatormanager Class, which triggers then an ID based translation of the app content via .ts and .qm files. So far so good.

    In QML, there are some text boxes, where users can write and send data .
    TextEdit { textFormat: TextEdit.AutoText ... }

    When touching the TextEdit boxes on Android, the softkeyboard shows up as it has to. But no matter, what the current locale is, I cannot change the language of the keyboard to Hindi. Clicking on the globe of the keyboard, I seem to be able to change the language but the layout is always English latin. Strange enough, in some instances the numbers are shown in Hindi but not the letters.

    • Adding Hindi besides English as a language in the settings of the Android device didn't change anything.
    • Installing Google Indic Keyboard from the app store as an alternative to Gboard and setting it to English & Indic Languages with Hindi selected didn't help.

    It needs to be mentioned that when I use a note pad app on the same device, the keyboard switches beautifully between the different languages and input systems. (English, English phonetic to Devanagari and Devanagari)

    Can anyone point me into a direction?
    What am I missing?
    Does Android need to know the locale?

    And the console shows the following error. But I am unsure, if that is related.
    W IInputConnectionWrapper: finishComposingText on inactive InputConnection

    Thanks a lot in advance

    To illustrate, the expected behaviour, this is the keyboard when I toggle through by pressing on the globe.

    0_1537690546593_note2sml.jpg
    1_1537690546594_note3sml.jpg
    2_1537690546594_note4sml.jpg
    3_1537690546594_note5sml.jpg

    And this is my app and again I am toggling through keyboard layouts by pressing on the globe. But the Android keyboard always sticks with the English layout, even though the space bar indicates Hindi.

    0_1537690640362_app2.jpg
    1_1537690640362_app3.jpg

    1 Reply Last reply
    0
    • _ Offline
      _ Offline
      _.-rFLo_.-
      wrote on 23 Sept 2018, 12:15 last edited by
      #2

      Alright, I found the error:

      In the TextEdit {} I had inputMethodHints: Qt.ImhNoPredictiveText because in earlier tests, sending emojis to TextEdit crashed the app.

      But with PredictiveText disabled, all fancy input methods and hence the different keyboards don't work. Also, Emojis are no problem anymore and animated Gifs are disabled.

      1 Reply Last reply
      2

      1/2

      22 Sept 2018, 14:43

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved