Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update supportedLocales, improvements of Chinese #795

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Foldblade
Copy link

English is not my native language; please excuse typing errors.

This config only use zh and zh-Hant in supportedLocales:

//'zh'          => ['name' => 'Chinese (Simplified)',   'script' => 'Hans', 'native' => ' 简体中文 ', 'regional' => 'zh_CN'],
//'zh-Hant'     => ['name' => 'Chinese (Traditional)',  'script' => 'Hant', 'native' => ' 繁體中文 ', 'regional' => 'zh_CN'],

Infact, the relationships of Chinese are like below:

  • zh: Chinese
    • zh-Hans: Simplified Chinese
      • zh-CN: Simplified Chinese, Mainland China
      • zh-SG: Simplified Chinese, Singapore
      • zh-MY: Simplified Chinese, Malaysia
    • zh-Hant: Traditional Chinese
      • zh-TW: Traditional Chinese, Taiwan
      • zh-HK: Traditional Chinese, Hong Kong
      • zh-MO: Traditional Chinese, Macau

The first problem of this config is, 繁體中文 - Chinese (Traditional) is mainly used in Taiwan, Hong Kong and Macau, so I think regional of zh-Hant should be better changed to zh-TW.

The second problem is, currently most browsers only use zh-CN, zh-TW, zh-HK in the "Accept-Language" field.

Here are two screenshoots:

chrome_G6VsAR5hg4

This screenshot is from Chrome, I will translate the options line by line as below:

  • Chinese —— zh
  • Traditional Chinese —— zh-TW
  • Simplified Chinese —— zh-CN
  • Chinese (Hong Kong) —— zh-HK

UyVqXDD1CI

Firefox provides us with more opinion, I will also translate the options line by line as below:

  • Chinese —— zh
  • Chinese (Taiwan) —— zh-TW
  • Chinese (Singapore) —— zh-SG
  • Chinese (Mainland China) —— zh-CN
  • Chinese (Hong Kong) —— zh-HK

Besides, the Laravel Lang project provides Chinese translation in zh-CN, zh-TW and zh-HK. When I use your project for the first time, the Accept-Language of my browser are zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2, but the localized URL returned zh and shown English, which confused me a lot.

So, I think it's better to add zh-CN, zh-TW and zh-HK, with zh-SG and zh-MY which are listed in zh.wikipedia.org by the way. And for those who do not want to maintain the regional language, it's also necessray to keep zh-Hans and zh-Hant.

Update:
zh-Hant

Add:
zh-Hans
zh-CN
zh-TW
zh-HK
zh-MO
zh-SG
zh-MY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant