Add persistent output locale override setting#6310
Conversation
* Add output.locale setting and schema support * Apply runtime language qualifier override for resource resolution * Include localized resw fallbacks in dev package and update docs/release notes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
florelis
left a comment
There was a problem hiding this comment.
LGTM, but I'd want to hold off on merging until we have a plan for what to do with App Installer.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@florelis - I get the same E2E test failures from my last checkout on
Recording.2026-07-01.224731.mp4 |
…tput-locale-override
There was a problem hiding this comment.
Pull request overview
Adds a new persisted output.locale user setting that lets WinGet override the UI/output language (via a supported BCP47 tag), and wires the setting into startup initialization so localized resources resolve accordingly. It also updates schema/docs/release notes and adjusts packaging to pick up localized winget.resw files during local builds.
Changes:
- Introduces
Setting::OutputLocale(settings mapping + validation/normalization against supported locale tags). - Applies the locale override at CLI startup via
ApplicationLanguages::PrimaryLanguageOverride. - Updates the settings schema + documentation + release notes, and adds packaging fallback to include localized
winget.reswfromLocalization\Resources\<locale>whenShared\Strings\<locale>is absent.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/AppInstallerCommonCore/UserSettings.cpp | Adds supported-locale normalization and validation for the new output.locale setting. |
| src/AppInstallerCommonCore/Public/winget/UserSettings.h | Adds the OutputLocale setting enum value and JSON mapping to .output.locale. |
| src/AppInstallerCLITests/UserSettings.cpp | Adds unit tests covering default/valid/case-insensitive/invalid locale values. |
| src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj | Adds build-time fallback PRIResource includes from Localization\\Resources\\<locale> for local builds. |
| src/AppInstallerCLICore/Core.cpp | Applies the persisted output locale override during startup initialization. |
| schemas/JSON/settings/settings.schema.0.2.json | Adds output.locale to the public settings schema with supported enum values. |
| doc/windows/package-manager/winget/settings.md | Documents the new output.locale setting for end users. |
| doc/Settings.md | Documents the new output.locale setting in the repo’s settings documentation. |
| doc/ReleaseNotes.md | Adds a release note entry for the new output locale override feature. |
| try | ||
| { | ||
| // Always apply the setting value, including empty string, to clear a persisted override from | ||
| // previous sessions. PrimaryLanguageOverride is package-scoped and persists across sessions. | ||
| winrt::Windows::Globalization::ApplicationLanguages::PrimaryLanguageOverride(Utility::ConvertToUTF16(localeTag)); | ||
| } |
There was a problem hiding this comment.
I don't think this applies, as we don't use qualifiers anywhere AFAIK
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Looks like we will need to reset the override in App Installer. Internal PR number for that: 16173490 |
📖 Description
Add a persistent
output.localeuser setting that allows overriding WinGet interface language via a BCP47 tag.This PR also ensures the override affects MRT resource resolution by setting both
ApplicationLanguages::PrimaryLanguageOverrideand the globalLanguagequalifier, and updates packaging so local builds can include localizedwinget.reswfiles fromLocalization\Resources\<locale>whenShared\Strings\<locale>is absent.🔗 References
Resolves #422
🔍 Validation
✅ Checklist
📋 Issue Type
Microsoft Reviewers: Open in CodeFlow