From 72040600d725e45db3f76034aac2577ef13b2798 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 21 Jul 2017 13:35:35 +0200 Subject: [PATCH] Set locale to "en_GB" if "en" is configured --- Source/Core/UICommon/UICommon.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp index 25c13bc8ce..783a3c94eb 100644 --- a/Source/Core/UICommon/UICommon.cpp +++ b/Source/Core/UICommon/UICommon.cpp @@ -98,6 +98,14 @@ void SetLocale(std::string locale_name) constexpr char OTHER_SEPARATOR = '-'; #endif + // Users who use a system language other than English are unlikely to prefer American date and + // time formats, so let's explicitly request "en_GB" if Dolphin's language is set to "en". + // (The settings window only allows setting "en", not anything like "en_US" or "en_GB".) + // Users who prefer the American formats are likely to have their system language set to en_US, + // and are thus likely to leave Dolphin's language as the default value "" (). + if (locale_name == "en") + locale_name = "en_GB"; + std::replace(locale_name.begin(), locale_name.end(), OTHER_SEPARATOR, PREFERRED_SEPARATOR); // Use the specified locale if supported.