<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -35,6 +35,7 @@
 #include &lt;QApplication&gt;
 #include &lt;QMessageBox&gt;
 #include &lt;QTranslator&gt;
+#include &lt;QSystemLocale&gt;
 #include &lt;QGLFormat&gt;
 #include &lt;QDebug&gt;
 #include &lt;QLibraryInfo&gt;
@@ -132,12 +133,28 @@ int main(int argc, char *argv[])
     }
   }
 
-  QString translationCode = QLocale::system().name();
   translationPaths &lt;&lt; QCoreApplication::applicationDirPath() + &quot;/../share/avogadro/i18n/&quot;;
 #ifdef Q_WS_MAC
   translationPaths &lt;&lt; QString(INSTALL_PREFIX) + &quot;/share/avogadro/i18n/&quot;;
 #endif
 
+  // Get the locale for translations
+  QString translationCode = QLocale::system().name();
+#if (QT_VERSION &gt;= QT_VERSION_CHECK(4, 6, 0))
+#ifdef Q_WS_MAC
+  // The QLocale::system() call on Mac doesn't reflect the default language -- only the default locale formatting
+  // so we'll fine-tune the respone with QSystemLocale
+  // This only applies to Qt/Mac 4.6.x and later, which added the appropriate Carbon magic to QSystemLocale.
+  QSystemLocale sysLocale;
+  QLocale::Language sysLanguage = static_cast&lt;QLocale::Language&gt;(sysLocale.query(QSystemLocale::LanguageId, QVariant()).toInt());
+  translationCode = QLocale::languageToString( sysLanguage );
+  qDebug() &lt;&lt; &quot; translation code: &quot; &lt;&lt; sysLanguage;
+  QLocale::Country sysCountry = static_cast&lt;QLocale::Country&gt;(sysLocale.query(QSystemLocale::CountryId, QVariant()).toInt());
+  if (sysCountry != QLocale::AnyCountry)
+    translationCode += '_' + QLocale::countryToString( sysCountry );
+#endif
+#endif
+
   qDebug() &lt;&lt; &quot;Locale: &quot; &lt;&lt; translationCode;
   // Load Qt translations first
   bool tryLoadingQtTranslations = false;</diff>
      <filename>avogadro/src/main.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9580aec326acbf68af1e1fb273979c81d4d16a4e</id>
    </parent>
  </parents>
  <author>
    <name>Geoff Hutchison</name>
    <email>babel@geoffhutchison.net</email>
  </author>
  <url>http://github.com/cryos/avogadro/commit/a875f17a24d9e551426be432e1008ec29477026a</url>
  <id>a875f17a24d9e551426be432e1008ec29477026a</id>
  <committed-date>2009-10-28T12:23:34-07:00</committed-date>
  <authored-date>2009-10-28T12:23:34-07:00</authored-date>
  <message>Add support for Qt-4.6 Mac language preferences.</message>
  <tree>3296ddce8d010e0a3abfd0836bcd70519e55b580</tree>
  <committer>
    <name>Geoff Hutchison</name>
    <email>babel@geoffhutchison.net</email>
  </committer>
</commit>
