How to detect the current language on Windows (I need the Qt way)
-
According with this post,
https://stackoverflow.com/questions/18594380/qlocale-detects-system-language-incorrectly-on-windows-with-language-pack-instal?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
the line of code
QLocale::system().name()
returns the value pointed from the red arrow. I need to have back the value of the green arrow.
Which is the right Qt way?
-
Hi,
Do you mean both the name and the country name ?
-
Then maybe, QLocale::uiLanguages is what you are looking for.
Or just check what a default constructed
QLocale
object returns. -
So everything is working as expected ?
-
Then please mark the thread as solved :)