Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Localization
Qt 6.11 is out! See what's new in the release blog

Localization

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 900 Views 2 Watching
  • 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.
  • D Offline
    D Offline
    dsba
    wrote on last edited by
    #1

    Hi,
    I am trying to localize audio of Qt android application. In order to this, I have written a say method in activity.java file..
    public static void say(String msg) {
    System.out.println("Say: " + msg);
    mtts.speak(msg, TextToSpeech.QUEUE_FLUSH, null, "msgId");
    mtts.speak(msg, TextToSpeech.QUEUE_ADD, null, "msgId");
    }
    When I switch language English works fine but when I change language to Japanese, then same English words are read in Japanese accent instead of reading whole Japanese translated string.

    Can anyone please help with this issue.

    Thanks in advance!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dsba
      wrote on last edited by
      #2

      At this line System.out.println("Say: " + msg); translated text was not getting printed then I made QCoreApplication::translate on passing arguments.. this worked fine..

      Example:
      say(QCoreApplication::translate("MainWindowInput", inText.toStdString().c_str()));

      where MainWindowInput is context name and inText is const String&

      1 Reply Last reply
      0

      • Login

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