I need to define the user language and country code in Qt. These codes must comply with the standards http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s04.html .
I tried QLocale, but it returned the full name of the country and language in countryToString and languageToString. (I need a short code, such as "en", not "English".)
One way is to create a map of QLocale :: Language and QString. But is there a faster and easier way?
source share