Skip to content

How to change or force storage pickers to a specific language? #6105

@ghost1372

Description

@ghost1372

Describe the bug

I have a multilingual application, and I use the following code to change the app language.

Microsoft.Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = language;
When I change the app language, I notice that the storage pickers’ language and layout also change to the selected language. This should not happen.

Is there any way to prevent this behavior? I want the pickers to remain the same across all languages.

When I change the application language, the window layout does not change. However, I believe that if we use the following code, the layout can change as well. Based on this, I think the pickers should behave similarly.

ResourceContext resourceContext = this.resourceManager.CreateResourceContext();
resourceContext.QualifierValues["Language"] = selectedLanguageItem.LanguageTag;

I am using the Persian language, which is RTL, but I do not want the pickers to switch to RTL. I want the pickers to always remain LTR, or to be forced to a specific language.

Steps to reproduce the bug

1.Create a Picker
2.Change App Language to a RTL like fa-IR
3.Open Picker

Expected behavior

@DinahK-2SO Can you help?

Screenshots

Image

NuGet package version

Windows App SDK 1.8.3: 1.8.251106002

Packaging type

Packaged (MSIX), Unpackaged

Windows version

Windows 11 version 24H2 LTSC (26100, June Update)

IDE

Visual Studio 2022

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-File accessTopics related to Microsoft.Windows.Storage.Pickers APIs for selecting files/folders etc.needs-triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions