PDA

View Full Version : QLocale::system().name() not working on Ubuntu 11.04 Natty Narwhal



Yashu
5th August 2011, 11:26
I am facing an issue on Ubuntu 11.04. I am trying to change the language of my application with QLocale::system().name(). This function works well with other Ubuntu releases (i.e. Ubuntu 9.10, 10.04 and 10.10 ) but it is not working with Ubuntu 11.04.

To look into the issue, Follow the steps.
1. At login screen select language English
2. The QLocale::system().name() will return "en_US"
3. Logout
4. At login screen select language Russian
5. The QLocale::system().name() is returning value "en_US"( or any random en_** ) where it should return "ru_RU".


Can anybody help me out?

jadonovan
8th August 2011, 15:04
I've noted that the environment variable, LANG isn't being changed in 11.04. When Spanish is selected at the 11.04 login, echo $LANG still gives en_US.LTF-8 which is the language selected during installation.

In other words, it looks like 11.04 uses the default language as the system language and Qt is getting that for the system.name.