microsoft / microsoft/react-native-windows
I18nManager.localeIdentifier() always returns en-us for unpackaged apps
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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