Template:Zh/doc

Revision as of 16:47, 29 August 2025 by ReinDevildom (talk | contribs) (Created page with "{{Documentation/Header}} {{Lua|Lang}} This template is a shorthand for formatting Chinese text by using {{T|Lang|mini=1|selective=1}} as a base. ==Syntax== All fields are optional except the Chinese text.<br> {{T|Zh|v1=Chinese text|v2=rm=Romanisation of the Chinese text|v3=tl=Translation of the Chinese text|v4=lit=Literal Translation of the Chinese Text}} ;Simplified and Traditional {{T|Zh|v1=s=Simplified Chinese text|v2=t=Traditonal Chinese text}} * {{F|rm}}, {{F|tl}}...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is the documentation page for Zh.
It contains usage information, categories, and other content not part of the original template page.
This template uses Module:Lang, a script written in Lua.

This template is a shorthand for formatting Chinese text by using {{Lang|selective = 1|mini = 1}} as a base.

Syntax

All fields are optional except the Chinese text.
{{Zh|Chinese text|rm = Romanisation of the Chinese text|tl = Translation of the Chinese text|lit = Literal Translation of the Chinese Text}}

Simplified and Traditional

{{Zh|s = Simplified Chinese text|t = Traditonal Chinese text}}

  • rm, tl and lit are still usable while also having extra parameters in the fashion of s_rm and t_tl.

Examples

{{Zh|你好呀,旅行者|rm = Nǐhǎo ya, Lǚxíngzhe|tl = Hello, Traveler|lit = Good Day, Traveler}} yields:
你好呀,旅行者 Nǐhǎo ya, Lǚxíngzhe, "Hello, Traveler," lit. "Good Day, Traveler"

Simplified and Traditional

{{Zh|s = 与|t = 與|rm = yǔ}} yields:
/

Template Data

Template for formatting chinese

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Chinese texttx 1

Chinese text to be formatted

Stringrequired
Romanizationrm 2

Romanization of the chinese text

Stringoptional
Translationtl 3

Translation of the chinese text

Stringoptional
Literal Translationlit 4

Literal translation of the Chinese text

Stringoptional