Chinese cannot be recognized using the browser language
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Hello, the current mapbox language settings are: Simplified Chinese: zh-Hans, Traditional Chinese: zh-Hant, but in the browser, zh-Hans and zh-Hant are not recognized language codes, so there is no way to automatically display Chinese for users in Chinese areas.
The language codes recognized in the browser are:
Simplified Chinese: zh-cn, zh-sg, zh
Traditional Chinese: zh-tw, zh-hk


I hope it can be adjusted, thank you!
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 by locating the browser-language detection and Mapbox language settings described in the issue. Check how zh-Hans and zh-Hant are matched against browser codes such as zh-cn, zh-sg, zh-tw, and zh-hk; done means Chinese-language browsers automatically display the appropriate Chinese variant.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, internationalization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100