Country / Locale settings in non-KDE desktops/OS
John Layt
johnlayt at googlemail.com
Fri Aug 28 10:43:53 BST 2009
On Friday 28 August 2009 07:05:03 Ralf Habacker wrote:
> John Layt schrieb:
> > 1) KLocale when it finds it doesn't have a Country configured should try
> > find the Country of the host shell and load that in preference to C.
> > QLocale::system().country() could give this, albeit with some futzing
> > around as it returns an enum not the ISO code?
>
> QLocale::system().name() returns 'de_DE' on my german windows installation.
>
> Ralf
I had seen that, but I wasn't sure if it would always return the second part
for the country code, but that sounds promising if you do get it. Looking at
the QLocale code it looks like it always does except for C or AnyCountry.
There is also a 'helper' method in qlocale.cpp for:
static QString countryToCode(QLocale::Country country)
but I'm not sure we can use that?
John.
More information about the kde-core-devel
mailing list