To give a chance to China programmers to use drupal, i suggest to add a localization for this language.
zh-hans language code is not universal,Please change into zh-cn,tks!
Simplified means that China,Traditional means that China Taiwan.

#4 wysiwyg.admin_.inc_.zip5.55 KBjoray


kiamlaluno’s picture

Assigned:joray» Unassigned
Issue tags:-language, -Localize

Simplified Chinese is already present in l.d.o.

kiamlaluno’s picture

Title:Add Chinese, Simplified (zh-cn)language to L.D.O.» Add Chinese, Simplified (zh-cn) language to l.d.o
Gábor Hojtsy’s picture

Status:Active» Closed (won't fix)

The way I'm understanding this one and #923306: Add Chinese, Traditional (zh-tw) language to l.d.o, you'd like to have the language codes renamed. Drupal uses the widely accepted IETF language tags standard (, of which RFC 4646 is the main part we work with. The RFC 4646 text explicitly has examples of zh-hant and zh-hans as two language variants for Chinese ( I'm not aware of these standards changing, and we need to obey the standards used by browsers, language identifier engines, etc. on the web instead of deviating in different directions.

Let us know if we are in a misunderstanding.

joray’s picture

Issue tags:+language, +Chinese
5.55 KB

Wysiwyg is a drupal module, but in file, I did not find the "zh-hans" and "zh-hant", so I think the "zh-cn" and "zh-tw" is more commonly used

joray’s picture

Status:Closed (won't fix)» Active
Gábor Hojtsy’s picture

Status:Active» Postponed (maintainer needs more info)

The current language list got into Drupal core over 6 years ago, and the Chinese language variants were using the "hans" and "hant" suffixes respectively ever since. I do not remember reading complaints about that before this one. Judging what's common based on a contributed module does not seem like an authentic way.

Did we do this wrong all through the past 6 years and nobody noticed or cared to alert us?!? This needs to have a strong case built and a contrib module doing something else is not that.

Gábor Hojtsy’s picture

Status:Postponed (maintainer needs more info)» Closed (won't fix)

Once again, just make sure you recognize we are referencing an internationally accepted standard that is used by the W3C and browser vendors to recognize language codes. Here is W3C's explanation: We need to use the same codes so search engines, browsers and other web robots properly recognize the languages when set up on Drupal sites.

Oh, BTW this W3C document shows we are indeed a bit outdated since RFC 4646 as mentioned above was obsoleted by RFC 5646 just after 3 years of being in effect. But that does not change the specifics of how Chinese language codes are standardized on the web by the W3C.

Marking won't fix again.

kiamlaluno’s picture

Issue tags:-language, -Chinese
joray’s picture

Status:Closed (won't fix)» Active

Although this is not an error, but it will hinder the development of drupal in China,
Add Chinese, Simplified (zh-cn) language to l.d.o,
and Add Chinese, Traditional (zh-tw) language to l.d.o too

I was only seen on "zh-hans" and "zh-hant",
When I first saw it, was so surprised!...

Gábor Hojtsy’s picture

Ok, how is zh-cn and zh-tw different to zh-hans and zh-hant beyond the language codes? Why is zh-cn and zh-tw not supported by the W3C standards? Is W3C hindering the development of the web in China?

kiamlaluno’s picture

Status:Active» Closed (won't fix)

RFC 5646 reports the following text (

Language subtag plus Script subtag:

zh-Hant (Chinese written using the Traditional Chinese script)

zh-Hans (Chinese written using the Simplified Chinese script)

sr-Cyrl (Serbian written using the Cyrillic script)

sr-Latn (Serbian written using the Latin script)

Extended language subtags and their primary language subtag

zh-cmn-Hans-CN (Chinese, Mandarin, Simplified script, as used in

cmn-Hans-CN (Mandarin Chinese, Simplified script, as used in

zh-yue-HK (Chinese, Cantonese, as used in Hong Kong SAR)

yue-HK (Cantonese Chinese, as used in Hong Kong SAR)


zh-Hans-CN (Chinese written using the Simplified script as used in
mainland China)

sr-Latn-RS (Serbian written using the Latin script as used in

If you want to propose the adoption of a different language script tags, you should report the link to a document that reports RFC 5646 is obsolete and wrong; just saying that you want to use zh-cn will not make the change happen.

joray’s picture

Category:task» bug
Priority:Normal» Critical
Status:Closed (won't fix)» Active

Why does the module use a different language code, drupal is using the other code, so why not follow the uniform standards.

It is not understandable why others are using "zh-CN" language code, but you have selected the "zh-hans".

Gábor Hojtsy’s picture

Title:Add Chinese, Simplified (zh-cn) language to l.d.o» zh-cn and zh-tw incorrectly used webmasters» Wysiwyg
Version:» 6.x-2.x-dev» Code
Priority:Critical» Normal

Well, in that case this is incorrectly used in the wysiwyg module. Moving the issue there.

Gerhard Killesreiter’s picture

Title:zh-cn and zh-tw incorrectly used» Add Chinese, Simplified (zh-cn) language to l.d.o
Project:Wysiwyg» webmasters
Category:bug» task
Status:Active» Closed (won't fix)

We are following the standards set by the W3C. If somebody else is not doing that, it is not our problem.

If you repoen this report once more I'll get angry.

Gábor Hojtsy’s picture

Title:Add Chinese, Simplified (zh-cn) language to l.d.o» zh-cn and zh-tw incorrectly used webmasters» Wysiwyg
Version:» 6.x-2.x-dev» Code
Category:task» bug
Status:Closed (won't fix)» Active

As said, let's get it resolved in wysiwyg for good then for consistency.

TwoD’s picture

Status:Active» Closed (duplicate)

As far as Wysiwyg is concerned, this issue will not be a problem when #362318: Limit wysiwyg language selection to available languages gets in.
It will limit the list of available languages to what the editor supports by scanning the relevant files.
This is also related to #532794: Use current user's language.
If the language codes used by the editors don't exactly match the ones used by Drupal, we'll most likely leave it up to the user to match them manually.

Please follow up in and perhaps help out with the above issues.

skyredwang’s picture

Version:6.x-2.x-dev» 7.x-2.x-dev
Priority:Normal» Critical
Status:Closed (duplicate)» Active

As right now, if either "Chinese, Simplified" or "Chinese, Traditional" is chosen at the interface language option, wysiwyg will use "Chinese, Traditional" language. Please point me to the codes that are handling this selection, I'd like to get this bug fixed.

#16 mentioned issues might be irrelevant to this bug.

TwoD’s picture

Priority:Critical» Normal
Status:Active» Closed (duplicate)

The list is fetched from Drupal Core, includes/
"Chinese, Simplified" is mapped to "zh-hans" and "Chinese, Traditional" is mapped to "zh-hant".
Wysiwyg itself does not care what you pick, it just passes the language code on to the editor, so I don't see where the bug could be.
What with the editor depends on which editor it is and if all the translation files are installed. Some editors don't support all the standardized language codes, but there's nothing we can do about that while we have a static list to pick from.

The issues mentioned in #16 will, once finished, detect which langages (language codes acually) an editor supports and display only those, so they're highly relevant as they'll get rid of any language code mismatches between Drupal and editors. If an editor can't then recognize the language codes it uses internally, well that's their problem...

joray’s picture

Status:Closed (duplicate)» Active

Opinionated!I can not understand!

If Wysiwyg do not want to fix this bug, or more modules are also unwilling to fix this bug, it will be a funny ending。

All related to the language code module will these problems occur, it will affect our experience。

That drupal should also continue to develop, if this bug can not be repaired, then I will have nothing to say!

joray’s picture

in includes/
You can change it into :
'zh-CN' => array('Chinese (PRC) ', '中文(中国)'),
'zh-TW' => array('Chinese (Taiwan)', '中文(台湾)'),
'zh-HK' => array('Chinese (Hong Kong, S.A.R. China)', '中文(香港)'),
'zh-SG' => array('Chinese (Singapore)', '中文(新加坡)'),
'zh-hans' => array('Chinese, Simplified', '简体中文'),
'zh-hant' => array('Chinese, Traditional', '繁體中文'),

TwoD’s picture

Status:Active» Closed (duplicate)

Please read what I wrote earlier. Wysiwyg does not decide which language codes to include in that list. The language code list is provided by Drupal Code, which follows an established ISO standard.

However, once we have time to fix the issues I linked to above Wysiwyg will no longer use a fixed language code list. It will instead inspect the editor library's files to determine which languages have been installed and present those. If there's a match against the current user's preferred language, the editor will be presented in that language, otherwise it will do a fallback to the site's language or perhaps the editor's default language.

snowolf_538’s picture

I made a sandbox module named WYSIWYG CKEditor Chinese, it helps to solve the issue without any coding for non-coders.

Yongwei’s picture

Issue summary:View changes

I am just surprised by statements like the following:

Why is zh-cn and zh-tw not supported by the W3C standards?

Actually, both zh-hans and zh-cn are valid language tags. The former is in the form "language-script", while the latter is in the form "language-region".

I can only guess why W3C thinks language-script is the preferred form, but that is probably not well-founded. Region differences are much more important than the script--e.g. Mainland China and Taiwan have different terms for the simple word "software".

In the end, while W3C prefers forms like zh-hant or zh-hant-tw, zh-CN and zh-TW prove much more popular. I have not found any big Chinese web sites using zh-han*. I think it is because you would then need the cumbersome zh-hant-TW form!

Yongwei’s picture

Let me further clarify by giving a detailed example:

  • en: software
  • zh-Hans-CN: 软件 (Chinese, Simplified Han, China)
  • zh-Hant-CN: 軟件 (Chinese, Traditional Han, China)
  • zh-Hans-TW: 软体 (Chinese, Simplified Han, Taiwan)
  • zh-Hant-TW: 軟體 (Chinese, Traditional Han, Taiwan)

The middle two forms are rarely used. While some Mainland Chinese may use 軟件 in certain contexts (say, to accommodate Hong Kong or Taiwan visitors), most Taiwanese abhor the simplified forms (either 软件 or 软体). That leaves only zh-Hans-CN and zh-Hant-TW in popular use.

While both zh-Hans and zh-CN can be ambiguous theoretically, for most practical purposes they are not, and zh-CN/zh-TW is shorter and emphasizes on the regional differences, which is more relevant.

Lastly, all modern operating systems support the form zh-CN. I can find a directory named zh-CN in iTunes. When I localize a resource to Chinese (PRC) in Visual Studio, it generates a file with zh-CN in the middle.

In summary, all the forms discussed so far (zh-CN, zh-Hans, and zh-Hans-CN) are valid as per RFC 5646, it can be argued that zh-CN (language-region) is the most preferred form in popular usage, as the language and the target audience is what authors want to aim at, but not the variant script.