diff --git a/engine/src/flutter/AUTHORS b/engine/src/flutter/AUTHORS index 83e173e6200..9dcfff52429 100644 --- a/engine/src/flutter/AUTHORS +++ b/engine/src/flutter/AUTHORS @@ -19,3 +19,4 @@ SOTEC GmbH & Co. KG Hidenori Matsubayashi Sarbagya Dhaubanjar Callum Moffat +Koutaro Mori diff --git a/engine/src/flutter/shell/platform/windows/system_utils_winuwp.cc b/engine/src/flutter/shell/platform/windows/system_utils_winuwp.cc index a37203a0e49..0fe91d6f77c 100644 --- a/engine/src/flutter/shell/platform/windows/system_utils_winuwp.cc +++ b/engine/src/flutter/shell/platform/windows/system_utils_winuwp.cc @@ -8,6 +8,9 @@ #include +#include "third_party/cppwinrt/generated/winrt/Windows.Foundation.Collections.h" +#include "third_party/cppwinrt/generated/winrt/Windows.System.UserProfile.h" + #include "flutter/shell/platform/windows/string_conversion.h" namespace flutter { @@ -23,12 +26,11 @@ std::vector GetPreferredLanguageInfo() { std::vector GetPreferredLanguages() { std::vector languages; - // TODO(clarkezone) need to implement a complete version of this function in - // order to get full list of platform languages - // https://github.com/flutter/flutter/issues/74156 - languages.push_back(L"en-US"); - languages.push_back(L"en"); - + auto platform_langueages = winrt::Windows::System::UserProfile:: + GlobalizationPreferences::Languages(); + for (const auto& platform_language : platform_langueages) { + languages.push_back(std::wstring{platform_language}); + } return languages; }