PDA

View Full Version : Qt4 + KDE + non-default locale = problem



yogeshm02
16th March 2008, 11:20
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,

wysota
16th March 2008, 11:34
What does the "locale" console command return for you?

yogeshm02
16th March 2008, 11:39
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?

wysota
16th March 2008, 11:47
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.

yogeshm02
16th March 2008, 11:54
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.



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?

wysota
16th March 2008, 12:55
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.

yogeshm02
16th March 2008, 15:17
Try running it by activating its icon on the desktop/file manager.

Still not working. Whatever I do it remains "en_US".


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?

wysota
16th March 2008, 16:37
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.