microsoft / microsoft/microsoft-ui-xaml
Unpackage apps ToggleSwitch's On/Off Content can't change by PrimaryLanguageOverride
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
As the title says. In unpackage apps, I try to set PrimaryLanguageOverride. Then the language in the application has changed, but the On/Off Content of ToggleSwitch is still the system language, not the corresponding language of PrimaryLanguageOverride. This will not happen in Package apps.
### Steps to reproduce the bug
1. Set your system language to non-English. Such as Chinese, French, Japanese, etc.
2. In App.xaml.cs, `Microsoft.Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = "en-us"`
3. Run application as Unpackage
### Expected behavior
You will see, ToggleSwitch's On/Off Content text will be your system language.If you run application as Package, the text will be displayed correctly in English.
### Screenshots
Unpackage:

Package:

### NuGet package version
WinUI 3 - Windows App SDK 1.6.6: 1.6.250228001
### Windows version
Windows 11 (23H2): Build 22631
### Additional context
_No response_
Contributor guide
Research direction
Reproduce the issue from App.xaml.cs using PrimaryLanguageOverride with a non-English system language, comparing packaged and unpackaged runs on Windows App SDK 1.6.6. Start by tracing ToggleSwitch's On/Off content localization and the package-mode difference. Done means the unpackaged ToggleSwitch displays the override language consistently with the packaged app.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, internationalization, localization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100