microsoft / microsoft/WindowsAppSDK

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

Open
#6,105 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area-File access needs-triage
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

### 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_

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named. Start by reproducing the storage picker after setting ApplicationLanguages.PrimaryLanguageOverride to fa-IR, then inspect the Windows App SDK storage-picker localization behavior and available language or layout controls. Done means confirming whether a supported way exists to keep the picker LTR or force a specific language.

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
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.