Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | wysiwyg.admin_.inc_.zip | 5.55 KB | joray |
Comments
Comment #1
apadernoSimplified Chinese is already present in l.d.o.
Comment #2
apadernoComment #3
Gábor HojtsyThe 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 (http://en.wikipedia.org/wiki/IETF_language_tag), 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 (http://tools.ietf.org/rfc/rfc4646.txt). 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.
Comment #4
joray CreditAttribution: joray commentedWysiwyg is a drupal module, but in wysiwyg.admin.inc file, I did not find the "zh-hans" and "zh-hant", so I think the "zh-cn" and "zh-tw" is more commonly used
Comment #5
joray CreditAttribution: joray commentedComment #6
Gábor HojtsyThe 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.
Comment #7
Gábor HojtsyOnce 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: http://www.w3.org/International/articles/language-tags/Overview.en.php 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.
Comment #8
apadernoComment #9
joray CreditAttribution: joray commentedAlthough 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
please.
I was only seen on drupal.org "zh-hans" and "zh-hant",
When I first saw it, was so surprised!...
Comment #10
Gábor HojtsyOk, 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?
Comment #11
apadernoRFC 5646 reports the following text (http://tools.ietf.org/html/rfc5646):
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.
Comment #12
joray CreditAttribution: joray commentedWhy 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".
Comment #13
Gábor HojtsyWell, in that case this is incorrectly used in the wysiwyg module. Moving the issue there.
Comment #14
Gerhard Killesreiter CreditAttribution: Gerhard Killesreiter commentedWe 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.
Comment #15
Gábor HojtsyAs said, let's get it resolved in wysiwyg for good then for consistency.
Comment #16
TwoDAs 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.
Comment #17
skyredwangAs 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.
Comment #18
TwoDThe list is fetched from Drupal Core, includes/iso.inc.
"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...
Comment #19
joray CreditAttribution: joray commentedOpinionated!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!
Comment #20
joray CreditAttribution: joray commentedin includes/iso.inc.
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', '繁體中文'),
Comment #21
TwoDPlease 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.
Comment #22
snowolf_538 CreditAttribution: snowolf_538 commentedI made a sandbox module named WYSIWYG CKEditor Chinese, it helps to solve the issue without any coding for non-coders.
Comment #23
Yongwei CreditAttribution: Yongwei commentedI am just surprised by statements like the following:
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!
Comment #24
Yongwei CreditAttribution: Yongwei commentedLet me further clarify by giving a detailed example:
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.
Comment #25
joray CreditAttribution: joray commentedhttps://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"