mapbox / mapbox/mapbox-gl-language
Chinese cannot be recognized using the browser language
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 204
- Forks
- 51
- 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 current Mapbox language settings in the project. Check how zh-Hans and zh-Hant are matched against browser language codes, then verify that the listed Simplified and Traditional Chinese codes select the corresponding map language. The issue mentions no file or test names, so the relevant entry point must be found first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, internationalization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100