Skip to content

Commit

Permalink
Load map from default to native language
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Nov 18, 2016
1 parent 847663b commit c9dd00d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ MainWindow::MainWindow(QWidget *parent) :
nRet = LoadMap(CGlobalDir::Instance()->GetDirData()
+ QDir::separator()
+ "Map_"
+ CGlobal::Instance()->GetLanguage()
+ (CGlobal::Instance()->GetLanguage() == "Default"
? QLocale::system().name()
: CGlobal::Instance()->GetLanguage())
+ ".earth");
if(nRet)
nRet = LoadMap(CGlobalDir::Instance()->GetApplicationEarthFile());
Expand Down Expand Up @@ -323,9 +325,7 @@ int MainWindow::InitMenuTranslate()
SLOT(slotActionGroupTranslateTriggered(QAction*)));
Q_ASSERT(check);

QSettings conf(CGlobalDir::Instance()->GetApplicationConfigureFile(),
QSettings::IniFormat);
QString szLocale = conf.value("Global/Language", "Default").toString();
QString szLocale = CGlobal::Instance()->GetLanguage();
QAction* pAct = m_ActionTranslator[szLocale];
if(pAct)
{
Expand Down

0 comments on commit c9dd00d

Please sign in to comment.