+
+ // load settings
+ if (_ts) {
+ QCoreApplication::removeTranslator (_ts);
+ _ts = NULL;
+ }
+
+ QString alias = _langs[_langIndex].alias ();
+ QString fileName = QString (APPLICATION_NAME) + "_";
+
+ _ts = new QTranslator;
+
+ if (alias.isEmpty ())
+ fileName += QLocale::system ().name ();
+ else
+ fileName += alias;
+
+ if (_ts->load (fileName, TRANSLATION_PATH)) {
+ QCoreApplication::installTranslator (_ts);
+ translationsUpdated ();
+ }
+ else {
+ delete _ts;
+ _ts = NULL;
+ }
+}
+
+
+QString Settings::regionName (const QString &id) const
+{
+ return Settings::tr (_cities[id].toUtf8 ());