Qt Code:
  1. QTextToSpeech *tessi = new QTextToSpeech(this);
  2. QVector<QLocale> localein = tessi->availableLocales();
  3. QTextStream out(stdout);
  4. out << "QTextToSpeech availableLocales \n";
  5.  
  6. foreach (const QLocale &locale, localein ) {
  7. int nr = (int)locale.language();
  8. QString country = QLocale::countryToString(locale.country());
  9. QString name(QString("%1 (%2)")
  10. .arg(QLocale::languageToString(locale.language()))
  11. .arg(locale.bcp47Name()));
  12. QVariant localeVariant(locale);
  13. out << "Lang Found:" << nr << "-" << name;
  14. out << "\n";
  15.  
  16. }
  17. out << "end... \n";
  18. out.flush();
To copy to clipboard, switch view to plain text mode 


How i can get the correct name from country self & language...

the result is :
Lang Found:31-English (en)
Lang Found:58-Italian (it)
Lang Found:114-Swedish (sv)
Lang Found:37-French (fr-CA)
Lang Found:42-German (de) but i wand "Deutsch"
Lang Found:48-Hebrew (he)
....... and other...

to get first 3 letter from https://github.com/tesseract-ocr/langdata
to download is data key... text key unicode qchar ecc...
example if i have the 3 first letter German ger not corect is deu "deutsch" its here a way? or write from hand a translate...