Qt-interest Archive, July 2007
Localization/Internationalization problem in Mac OS X
Message 1 in thread
Hi all,
Sorry if I'm repeating my previous question. I'm
having problem localizing my Qt application in Mac OS
X 10.4.x. In System Preference->Languages, I set
Italian as the top of the language list ahead of
English. All the Mac applications, such as Safari,
display Italian in their menu bar and dialogs. But
somehow the Qt call QLocale::system().name() still
returns "en_US". How can I get the current language
correctly?
Thank you,
PB
____________________________________________________________________________________
Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.
http://autos.yahoo.com/carfinder/
--
[ signature omitted ]
Message 2 in thread
Hi,
the language setting in the System Preference is only for apps, which
work with the app-bundle system in OS X, for example Cocoa-Apps like
Safari and Mail or Carbon-NIB-based apps. If you right-click Safari
and chose "Show package-contents" then you see a folder called
"Contents", and in there also a folder called "Resources". In there
you will find some folders called "English.lproj", "German.lproj" or
"Italian.lproj". There you find the translation.
Qt uses an other way of translation the apps. It takes the locale
(which is on the second page of the International settings). Because
this locale is for the date, time and number format, and exist in any
OS, like Linux and Windows. QLocale is an object to help to format
numbers, dates and times. It can be read out for the language
setting, but on OS X it only uses the "Region" locale, not the OS X
language setting.
Hope I could help.
Jens
> "Hi all,
>
> Sorry if I'm repeating my previous question. I'm
> having problem localizing my Qt application in Mac OS
> X 10.4.x. In System Preference->Languages, I set
> Italian as the top of the language list ahead of
> English. All the Mac applications, such as Safari,
> display Italian in their menu bar and dialogs. But
> somehow the Qt call QLocale::system().name() still
> returns "en_US". How can I get the current language
> correctly?
>
> Thank you,
>
> PB
>