DolphinQt2: Set locale

We want things like number formatting to be done the way the user expects.
This commit is contained in:
JosJuice 2018-03-10 13:38:23 +01:00
parent 72040600d7
commit 13d060491c
1 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,7 @@
#include "Common/MsgHandler.h" #include "Common/MsgHandler.h"
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "UICommon/UICommon.h"
constexpr u32 MO_MAGIC_NUMBER = 0x950412de; constexpr u32 MO_MAGIC_NUMBER = 0x950412de;
@ -270,6 +271,10 @@ static bool TryInstallTranslator(const QString& exact_language_code)
if (translator->load(filename)) if (translator->load(filename))
{ {
QApplication::instance()->installTranslator(translator); QApplication::instance()->installTranslator(translator);
QLocale::setDefault(QLocale(exact_language_code));
UICommon::SetLocale(exact_language_code.toStdString());
return true; return true;
} }
translator->deleteLater(); translator->deleteLater();