[Qt-interest] QLocale::system() on Mac returns US, not Australia

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Mon Oct 18 11:09:40 CEST 2010


Hi Everybody, 

I am using Qt 4.6.0 binaries insalled from Qt web site, on an iMac running OS X 10.5, and compiling via Xcode.  In System preferences I have: 

- International / Language tab / English as first language. 
- International / Formats / Region: Australia, no customisations. 
- Date & Time / Time Zone / EST Closest city: Melbourne - Australia. 

This code: 

	QLocale l = QLocale::system();
	qDebug() << "System locale: name" << l.name()
		<< "country" << l.countryToString( l.country() )
		<< "language" << l.languageToString( l.language() );

shows:

	System locale: name "en_US" country "UnitedStates" language "English"

On Windows XP with similar system settings it correctly shows: 

	System locale: name "en_AU" country "Australia" language "English"

Have I missed a setting in Mac System Preferences? 

Tony.






More information about the Qt-interest-old mailing list