Except for websites created by Drupal, no websites use "zh-hans" and "zh-hant" language codes.

Created on 6 February 2020, almost 5 years ago
Updated 23 December 2023, 12 months ago

Except for websites created by Drupal, no websites use "zh-hans" and "zh-hant" language codes.

public static function getStandardLanguageList() {
       'ur' => ['Urdu', /* Left-to-right marker "‭" */ 'اردو', LanguageInterface::DIRECTION_RTL],
       'vi' => ['Vietnamese', 'Tiếng Việt'],
       'xx-lolspeak' => ['Lolspeak', 'Lolspeak'],
+      'zh' => ['Chinese', '中文'],
+      'zh-cn' => ['Chinese, China', '中文中国'],
+      'zh-tw' => ['Chinese, Taiwan', '中文台湾'],
       'zh-hans' => ['Chinese, Simplified', '简体中文'],
       'zh-hant' => ['Chinese, Traditional', '繁體中文'],
     ];

https://www.un.org/zh/sections/about-un/official-languages/index.html

The official website of the United Nations also uses "zh" instead of "zh-hans"

   public static function getUnitedNationsLanguageList() {
     return [
       'ar' => ['Arabic', /* Left-to-right marker "‭" */ 'العربية', LanguageInterface::DIRECTION_RTL],
-      'zh-hans' => ['Chinese, Simplified', '简体中文'],
+      'zh' => ['Chinese', '中文'],
       'en' => ['English', 'English'],
       'fr' => ['French', 'Français'],
       'ru' => ['Russian', 'Русский'],

Browsers are more convenient for visitors by identifying the language code to use.
Example: The browser obtained that the visitor's current area is in China, and the webpage content using "zh-CN" encoding will be called up on the website. This will be without any errors, and the browser does not need to judge.
If you are in Hong Kong now, it should be a difficult decision whether the browser should render "zh-hans" encoded web pages or "zh-hant".
So the language code contains regions will be more common.

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
Language system 

Last updated about 20 hours ago

  • Maintained by
  • 🇩🇪Germany @sun
Created by

🇨🇳China joray

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024