From b9a3c8c6ba9fb96a4c9ff4029b9f29a4ad0210b8 Mon Sep 17 00:00:00 2001 From: Evelyn Wu <50890554+evelynwu-msft@users.noreply.github.com> Date: Thu, 12 Sep 2024 18:05:05 -0700 Subject: [PATCH] Revert "[MRTCore] Sync between WGA.PrimaryLanguageOverride and MWGA.PrimaryLanguageOverride (#4608)" (#4712) This reverts commit 68ffb095b3de98fb6fd11c3898dea7bec4fff978. --- .../src/ResourceContext.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/dev/MRTCore/mrt/Microsoft.Windows.ApplicationModel.Resources/src/ResourceContext.cpp b/dev/MRTCore/mrt/Microsoft.Windows.ApplicationModel.Resources/src/ResourceContext.cpp index 4e30d95d1..73a7e2188 100644 --- a/dev/MRTCore/mrt/Microsoft.Windows.ApplicationModel.Resources/src/ResourceContext.cpp +++ b/dev/MRTCore/mrt/Microsoft.Windows.ApplicationModel.Resources/src/ResourceContext.cpp @@ -6,8 +6,6 @@ #include "ResourceContext.g.cpp" #include "winrt/Windows.Globalization.h" -#include - const wchar_t c_languageQualifierName[] = L"Language"; #include "ApplicationLanguages.h" @@ -103,16 +101,6 @@ void ResourceContext::Apply() winrt::check_hresult(MrmSetQualifier(m_resourceContext, eachValue.Key().c_str(), eachValue.Value().c_str())); } } - - // sync with Windows::Globalization::ApplicationLanguages::PrimaryLanguageOverride if it has been updated more recently - if (AppModel::Identity::IsPackagedProcess()) - { - auto language = winrt::Windows::Globalization::ApplicationLanguages::PrimaryLanguageOverride(); - if (language != ApplicationLanguages::PrimaryLanguageOverride()) - { - ApplicationLanguages::PrimaryLanguageOverride(language); - } - } if (!ApplicationLanguages::PrimaryLanguageOverride().empty()) { winrt::check_hresult(MrmSetQualifier(m_resourceContext, c_languageQualifierName, ApplicationLanguages::PrimaryLanguageOverride().c_str()));