1

I'm adding language support into a Qt C++ application currently using QLocale and QTranslator. When the user selects the language from the settings menu, I want to show them the Language name in the native form (e.g. Deutsch instead of German), but when given a locale code QLocale returns the name as per the current locale (i.e. English).

Is there a way I can get the language name in native form using QLocale or something else in Qt which I've missed.

Cœur
  • 37,241
  • 25
  • 195
  • 267
SionHughes
  • 128
  • 11
  • 1
    `QLocale::nativeLanguageName`, see http://doc.qt.io/qt-5/qlocale.html#nativeLanguageName – Felix Dec 08 '15 at 19:06
  • Thanks for the heads up, looked like I missed that one. I'm now `QLocale::nativeLanguageName` on a `QLocale` object create using the locale name from the translation files I have. – SionHughes Dec 08 '15 at 20:17

0 Answers0