patrik08
29th July 2017, 13:07
QTextToSpeech *tessi = new QTextToSpeech(this);
QVector<QLocale> localein = tessi->availableLocales();
QTextStream out(stdout);
out << "QTextToSpeech availableLocales \n";
foreach (const QLocale &locale, localein ) {
int nr = (int)locale.language();
QString country = QLocale::countryToString(locale.country());
QString name(QString("%1 (%2)")
.arg(QLocale::languageToString(locale.language()))
.arg(locale.bcp47Name()));
QVariant localeVariant(locale);
out << "Lang Found:" << nr << "-" << name;
out << "\n";
}
out << "end... \n";
out.flush();
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...
QVector<QLocale> localein = tessi->availableLocales();
QTextStream out(stdout);
out << "QTextToSpeech availableLocales \n";
foreach (const QLocale &locale, localein ) {
int nr = (int)locale.language();
QString country = QLocale::countryToString(locale.country());
QString name(QString("%1 (%2)")
.arg(QLocale::languageToString(locale.language()))
.arg(locale.bcp47Name()));
QVariant localeVariant(locale);
out << "Lang Found:" << nr << "-" << name;
out << "\n";
}
out << "end... \n";
out.flush();
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...