QLocale::uiLanguages() returns erroneous value
I want to enable automatic language detection for my application.
So, I call
translator->load(QLocale::system(), "wallch", "_", translationsFolder, ".qm")
This should load the appropriate qm file based on system language.
But it fails miserably because it detects English and not Greek.
I searched a bit the QLocale documentation and the code
qDebug() << QLocale::system().uiLanguages();
which is totally wrong, because on my system's locale settings (KDE 4.14.1, KUbuntu 14.10) I've set Greek as my preferred and then English:
Does anyone know if this is a bug or whether I'm doing something wrong?
It's worth noting that my whole system user interface is displayed in Greek, the menus, the programs, everything. Also it's worth noting that KDE applications (that detect that Greek is the appropriate language to load the application in) are actually written in Qt too!
Output of the locale command under my system:
AFAIK, and from your post, it seems that QLocale is using english