05f6862
--- kdelibs-3.5.6/kdecore/klocale.cpp.orig	2007-05-22 17:49:31.000000000 +0200
05f6862
+++ kdelibs-3.5.6/kdecore/klocale.cpp	2007-05-23 20:37:54.000000000 +0200
05f6862
@@ -140,9 +140,11 @@ void KLocale::initLanguageList(KConfig *
05f6862
   KConfigGroupSaver saver(config, "Locale");
05f6862
 
05f6862
   m_country = config->readEntry( "Country" );
05f6862
-  if ( m_country.isEmpty() )
05f6862
-    m_country = defaultCountry();
05f6862
-
05f6862
+  if ( m_country.isEmpty() ) {
05f6862
+    QString ln, ct, chrset;
05f6862
+    splitLocale(QString(::getenv("LANG")), ln, ct, chrset);
05f6862
+    m_country = (ct.isEmpty()) ? defaultCountry() : ct.lower();
05f6862
+  }
05f6862
   // Reset the list and add the new languages
05f6862
   QStringList languageList;
05f6862
   if ( useEnv )