Module talk:Lang-zh
Add topic| Module:Lang-zh is indefinitely protected from editing as it is a heavily used or highly visible module. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit.
|
| This module does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| To help centralize discussions and keep related topics together, Template talk:Lang-zh and Template talk:Lang-zh/doc redirect here. |
| On 7 May 2026, it was proposed that this page be moved from Module:Lang-zh to Module:Chinese. The result of the discussion was no consensus. |
Hi all! Could we please add Yale romanization of Mandarin to the template? Given that this is the English-language wikipedia, and the set of spelling/pronunciation rules used by Yale romanization of Mandarin is the closest to English's own spelling/pronunciation rules, it would be helpful if Yale romanization of Mandarin could be added to the template. In many cases, this would be helpful for native English speakers to pronounce Chinese words even if they haven't learnt any system of romaization of Mandarin before, as the system of Yale romanization of Mandarin was designed to be intuitive for English speakers. Many thanks! – 星球统领 (talk) 23:36, 11 February 2026 (UTC)
- @星球统领: The current consensus is that pinyin is the default romanisation of Mandarin, and other systems are only to be used in special cases; see MOS:PINYIN. Freelance Intellectual (talk) 15:35, 12 February 2026 (UTC)
- It isn't this template's objective to require any particular transliteration - that is left to the MOS:PINYIN to decide. The template was designed to support common transliterations that may be required in an article, but it is not exhaustive. For less commonly used transliterations, alternative markup methods exist, such as Template:Transliteration and Template:Langx. Rincewind42 (talk) 13:14, 13 February 2026 (UTC)
Add Teochew Romanization
[edit]This is a request to add Pe̍h-ūe-jī (Teochew Church Romanisation) to the template. I have recently adding a lot of romanisations for people on singapore related articles and many have teochew names so it is quite frustrating to keep having to type " ; Pe̍h-ūe-jī: " for every single case of teochew usage. Warpswitch (talk) 21:51, 28 March 2026 (UTC)
Requested move 7 May 2026
[edit]- The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion.
The result of the move request was: no consensus. This discussion has been open for well over a month, and I am not seeing any consensus to move. Editors may at any time propose the alternative move of Korean and Nihongo to lang-ko and lang-ja. (closed by non-admin page mover) BilledMammal (talk) 05:06, 16 June 2026 (UTC)
– To make it consistent with other East Asian script templates, like {{Korean}} and {{Nihongo}}. Other previous templates like {{Lang-xx}} were largely replaced with {{Langx}}. Absolutiva 08:57, 7 May 2026 (UTC) — Relisting. Jeffrey34555 (talk) 04:17, 14 May 2026 (UTC)— Relisting. Primefac (talk) 17:36, 22 May 2026 (UTC) — Relisting. ⹃Maltazarian ᚾparleyinvestigateᛅ 12:14, 29 May 2026 (UTC)
- Support per nom. Wasting time is still my passion (talk) 16:38, 17 May 2026 (UTC)
Administrator note I have re-opened this discussion (closed without further commentary in Special:Diff/1355278435) as an uninvolved/individual admin action. This is for two main reasons: first, {{chinese}} is transcluded on almost 4k pages. Second (and as a result of the first), the discussion was started by a (now-)blocked sock and only commented on by a single other individual. Third, the final target template name in question is a redirect and should have been dealt with at WP:RFD before this RM was opened, but I probably will do so just for the sake of formality while this discussion is relisted again. Primefac (talk) 17:36, 22 May 2026 (UTC)- Note: WikiProject China, WikiProject Malaysia, WikiProject Taiwan, WikiProject Macau, WikiProject Hong Kong, WikiProject Singapore, and WikiProject Writing systems have been notified of this discussion. ASUKITE 17:56, 22 May 2026 (UTC)
- Thank you for relisting this, Primefac. I hadn't seen this RM, as no Wikiprojects had been notified. The move makes some sense, since new editors will probably find the template more easily. Replacing it would be a pain, but it seems manageable. So, I guess I'm okay with it? But I'm generally not fussed either way. Toadspike [Talk] 21:54, 22 May 2026 (UTC)
- Weak support What Toadspike said — now that the {{lang-xx}} templates have been superseded by {{langx}}, this name is less important. I would prefer that {{Korean}} and {{Nihongo}} were moved to {{lang-ko}} and {{lang-ja}} — especially the latter, as Nihongo fails ENGLISHTITLE — but I accept that plain English names might be better than expecting users to know ISO 639 codes. I would support this more strongly if we were also moving Template:Nihongo → Template:Japanese, Module:Nihongo → Module:Japanese, and bypassing the redirect to Template:Japanese script needed for existing {{Japanese}} calls. But I don't feel strongly enough to make and defend the case for doing so. — OwenBlacker (he/him; Talk) 06:25, 25 May 2026 (UTC)
- I would agree with the Nihongo to Japanese moves. Those are out of the scope of this RM, but if anyone feels like proposing them, be my guest. Toadspike [Talk] 09:11, 25 May 2026 (UTC)
- Support moving for consistency reasons, a Nihongo to Japanese move would also have my support. Yeeno (talk) 04:49, 27 May 2026 (UTC)
- Oppose. {{lang-zh}} follows the same naming convention as the other excluded templates in Wikipedia:Templates for discussion/Log/2024 September 27/lang-?? templates, and {{Infobox Chinese}} follows the naming convention of, e.g., {{Infobox Japanese}}. For consistency, I think {{Korean}} and {{Nihongo}} should be moved to {{lang-ko}} and {{lang-ja}}, respectively. Snowman304|talk 01:11, 28 May 2026 (UTC)
- I would certainly support this more strongly — OwenBlacker (he/him; Talk) 07:50, 28 May 2026 (UTC)
- Oppose. This is a lang module and should still follow the same naming conventions. In an ideal world, Module:Lang would be able to handle this completely. Gonnym (talk) 11:12, 15 June 2026 (UTC)
Wade–Giles superscripts
[edit]Now that Wikipedia:Manual of Style/Superscripts and subscripts is a guideline, it's clear that we should use Unicode superscripts for WG tones. Dingolover6969 (talk) 15:15, 5 June 2026 (UTC)
Discrepancy on testcases page regarding "doesn't handle self-inserted single-quotes"
[edit]The test case page included this, in case anyone is interested:
* {{Lang-zh|s=中国|t=中國|p=zhōngguó|l='Middle Kingdom, Central Kingdom; Central State|tr=China|j=Gwong2 zau1|cy=Gwóngjàu|first=t,j|labels=no|out=tr}}—{{strongbad|''doesn't handle self-inserted single-quotes''}}
I am changing it to be a copy of the sandbox case, instead:
* {{Lang-zh|s=中国|t=中國|p=zhōngguó|l='Middle Kingdom, Central Kingdom; Central State|tr=China|j=Gwong2 zau1|cy=Gwóngjàu|first=t,j|labels=no|out=tr}} Dingolover6969 (talk) 00:09, 2 August 2026 (UTC)
Template-protected edit request on 1 August 2026
[edit]| It is requested that an edit be made to the template-protected module at Module:Lang-zh. (edit · history · last · links · sandbox · edit sandbox · sandbox history · sandbox last edit · sandbox diff · transclusion count · protection log) This template must be followed by a complete and specific description of the request, so that an editor unfamiliar with the subject matter could complete the requested edit immediately.
Edit requests to template-protected pages should only be used for edits that are either uncontroversial or supported by consensus. If the proposed edit might be controversial, discuss it on the protected page's talk page before using this template. Consider making changes first to the module's sandbox before submitting an edit request. To request that a page be protected or unprotected, make a protection request. When the request has been completed or denied, please add the |
Change
val = val:gsub("(%d)", "<sup>%1</sup>"):gsub("(%d)</sup>%*<sup>(%d)", "%1*%2"):gsub("<sup><sup>([%d%*]+)</sup></sup>", "<sup>%1</sup>")
to
val = val:gsub("0", "⁰"):gsub("1", "¹"):gsub("2", "²"):gsub("3", "³"):gsub("4", "⁴"):gsub("5", "⁵"):gsub("6", "⁶"):gsub("7", "⁷"):gsub("8", "⁸"):gsub("9", "⁹")
Remarks:
- I am not aware of any more elegant way to do this in lua.
- I checked and lua %d means [0-9], or so the documentation implies. I also experimented with this in a lua sandbox online and found the same.
- As we no longer use sup tags, this change drops some complicated sup tag handling from this line. Undoubtedly, this means some pages that erroneously use sup tags in {{zh}} will now be rendered with a superscript ² ( ² ) until they are fixed. It would be trivial to fix/mask this in the template, using a line
val = val:gsub("<sup>([%d%*]+)</sup>", "%1") -- remove redundant html sups. But I'm not sure it's valuable to do so. If it is valuable, maybe it should also be done to jyutping, to remove any numbers that are superscripted erroneously? I defer this change to later.- I'm not really sure why the old code includes %* — which is an escaped (ergo: regular) asterisk in lua regex — the way it does. Why would the * be used like this? That's not even in Sidney Lau romanisation, which does use an asterisk. The testcases are not illuminating... wish someone had left a comment here. It seems to have been added without explanation, in the context of Wade-Giles, by User:Jc86035. Anyway, assuming normal asterisks are alright, the new code will still work... for whatever that's for...
- Perhaps we should add a tracking category for zhs that use an asterisk, to see if we can find them?
- I'm not really sure why the old code includes %* — which is an escaped (ergo: regular) asterisk in lua regex — the way it does. Why would the * be used like this? That's not even in Sidney Lau romanisation, which does use an asterisk. The testcases are not illuminating... wish someone had left a comment here. It seems to have been added without explanation, in the context of Wade-Giles, by User:Jc86035. Anyway, assuming normal asterisks are alright, the new code will still work... for whatever that's for...
- In Sidney Lau romanisation, the * is an asterisk and the 0-like symbol is a ° (a "small circle"), so no special handling of these are needed. (In contrast, the 0-like character in the code above is a unicode superscript 0. I'm not aware of any system that uses a 0 tone marker, but we are prepared 🫡.)
- No LLMs used (except to list out the 0-9 superscript digits) — I'm just like this. Dingolover6969 (talk) 00:39, 2 August 2026 (UTC)
- Template-Class Writing system pages
- NA-importance Writing system pages
- Template-Class China-related pages
- NA-importance China-related pages
- WikiProject China articles
- Template-Class Taiwan pages
- NA-importance Taiwan pages
- WikiProject Taiwan articles
- Template-Class Hong Kong pages
- NA-importance Hong Kong pages
- WikiProject Hong Kong articles
- NA-Class Macau pages
- NA-importance Macau pages
- WikiProject Macau articles
- Template-Class Singapore pages
- NA-importance Singapore pages
- WikiProject Singapore articles
- Template-Class Malaysia pages
- NA-importance Malaysia pages
- WikiProject Malaysia articles
- Wikipedia template-protected edit requests