mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 14:39:01 +01:00
DolphinQt2: Set locale
We want things like number formatting to be done the way the user expects.
This commit is contained in:
parent
72040600d7
commit
13d060491c
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user