Localization



  • 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!



  • 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&


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.