QLocale::system().name() does not return language nor country code
I have tried to get the localization to work on my application. For some reason I cannot get QLocale::system().name() to return correct language nor country code. When I write "locale" in terminal of my Jolla phone it returns "LANG=fi_FI.utf8". However, my application gets only an empty string "".
I am aware of the this hack https://together.jolla.com/question/11041/bug-qlocalesystem-returns-incorrect-locale-while-run-in-debugger/ but I don't think that this should be a problem since mr. iiska stated that he has been able to run his code on the device correctly which I have not accomplished.
However, Aequanix is having same kind of issue when he/she is using SSH to find out the locale. https://together.jolla.com/question/31538/ssh-locale/
So far I have tried following code examples for implementing the translations/localizations: https://lists.sailfishos.org/pipermail/devel/2014-January/002630.html https://gitorious.org/xbmcremote/robertme-xbmcremote/source/428ccd127e0c86850650df4b1787b108588c3595:apps/sailfish/src/main.cpp#L42 http://qt-project.org/doc/qt-5/linguist-programmers.html and by studying code of KitchenTimer and friends -applications without any luck. Could some please advice? Is this a specific issue related to my phone or general issue? (I am running OS version 1.0.4.20)
To make sure, is this with application started from the device? I.e. clicking icon on the application grid.
Pekka Vuorela ( 2014-03-26 15:49:16 +0300 )edit