Results 1 to 2 of 2

Thread: QLocale::system().name() not working on Ubuntu 11.04 Natty Narwhal

  1. #1
    Join Date
    Aug 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QLocale::system().name() not working on Ubuntu 11.04 Natty Narwhal

    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?

  2. #2
    Join Date
    Aug 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QLocale::system().name() not working on Ubuntu 11.04 Natty Narwhal

    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.

Similar Threads

  1. Ubuntu Unity - GOODBYE SYSTEM TRAY
    By genjix in forum General Programming
    Replies: 1
    Last Post: 13th May 2011, 07:51
  2. Working with MYSQL in ubuntu
    By zero-n in forum Newbie
    Replies: 1
    Last Post: 26th July 2010, 21:02
  3. Qt windowing system Working
    By awalesminfo in forum Newbie
    Replies: 1
    Last Post: 30th December 2008, 12:48
  4. QLocale::system().name() returns "C" instead of "de"
    By momesana in forum Qt Programming
    Replies: 1
    Last Post: 18th February 2008, 14:59
  5. QProcess / system call not working under linux. Why?
    By johnny_sparx in forum Qt Programming
    Replies: 12
    Last Post: 11th March 2006, 00:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.