Skip to content

Unpackage apps ToggleSwitch's On/Off Content can't change by PrimaryLanguageOverride #10430

@ChenYiLins

Description

@ChenYiLins

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:

Unpackage

Package:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions