mapbox / mapbox/mapbox-gl-language

Chinese cannot be recognized using the browser language

Open
#66 2 comments 0 reactions 0 assignees View on GitHub

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

Image

Image

I hope it can be adjusted, thank you!

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.