microsoft / microsoft/react-native-windows

I18nManager.localeIdentifier() always returns en-us for unpackaged apps

Open
#12,801 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Fabric Area: I18nManager enhancement New Architecture Workstream: Component Parity
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Since we are moving away from UWP only with the new architecture we might want to consider changing to use the win32 API instead of the packaged app centric API we are using for I18nManager currently. -- We might at least want to have it fallback to the win32 api in the case of non-packaged apps.

GetUserDefaultLocaleName function (winnls.h) - Win32 apps | Microsoft Learn
and
GetLocaleInfoEx function (winnls.h) - Win32 apps | Microsoft Learn

Currently packaged apps will always get en-us if their manifest doesn't declare additional supported languages. - It's possible that more users would expect it to use the win32 APIs rather than only returning locales that their manifest declares?

Contributor guide

Open the contributing guide

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

Start at I18nManager.localeIdentifier() and compare its current packaged-app locale behavior with the documented GetUserDefaultLocaleName and GetLocaleInfoEx Win32 APIs. The work is done when unpackaged apps use the appropriate Win32 locale instead of always returning en-us, while packaged-app behavior is intentionally verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
internationalization, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.