Results 1 to 8 of 8

Thread: Qt4 + KDE + non-default locale = problem

  1. #1
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Qt4 + KDE + non-default locale = problem

    Hi

    I'm writing a pure Qt4 application, presently working on Linux/openSUSE/KDE3 & 4.

    I've tried changing locale settings (to enable Hindi language) in KDE3 as well as KDE4, still QLocale::system().name() is returning "en_US" in my application.
    Do this change needed to be applied to whole system for Qt to detect locale e.g through YaST?

    Thanks,

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt4 + KDE + non-default locale = problem

    What does the "locale" console command return for you?

  3. #3
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt4 + KDE + non-default locale = problem

    Same as Qt i.e.
    LANG=en_US.UTF-8
    But what do I do to change it? As said earlier I've changed locale settings through KDE and all apps (except Qt) are launching in "Hindi", the locale I selected.
    Any idea?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt4 + KDE + non-default locale = problem

    How do you launch your Qt apps? All KDE applications are at the same time Qt applications, remember that.

    You should change your system settings to reflect proper locale, regardless of how the desktop manager is set up.

  5. #5
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt4 + KDE + non-default locale = problem

    Quote Originally Posted by wysota View Post
    How do you launch your Qt apps? All KDE applications are at the same time Qt applications, remember that.
    Through menu, shell; my application is being launched from shell in a directory in which it was built.

    Quote Originally Posted by wysota View Post
    You should change your system settings to reflect proper locale, regardless of how the desktop manager is set up.
    But, then this will change settings for all users on system. Right?

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt4 + KDE + non-default locale = problem

    Quote Originally Posted by yogeshm02 View Post
    Through menu, shell; my application is being launched from shell in a directory in which it was built.
    Try running it by activating its icon on the desktop/file manager.

    But, then this will change settings for all users on system. Right?
    It depends how (where) you set it. If you do that in your profile only it will only be relevant for you.

  7. #7
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt4 + KDE + non-default locale = problem

    Quote Originally Posted by wysota View Post
    Try running it by activating its icon on the desktop/file manager.
    Still not working. Whatever I do it remains "en_US".

    Quote Originally Posted by wysota View Post
    It depends how (where) you set it. If you do that in your profile only it will only be relevant for you.
    If you meanth KDE/kcontrol, then i've already done that, otherwise how that can be done? Should I contact openSUSE?

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt4 + KDE + non-default locale = problem

    Quote Originally Posted by yogeshm02 View Post
    If you meanth KDE/kcontrol, then i've already done that, otherwise how that can be done? Should I contact openSUSE?
    No, I meant ~/.bash_profile or equivalent.

Similar Threads

  1. Replies: 16
    Last Post: 7th March 2006, 15:57
  2. What default constructor?
    By bitChanger in forum General Programming
    Replies: 5
    Last Post: 15th February 2006, 19:50

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.