Description

edit

This template handles the language conversion ("LC") for Mandarin ("zh") page titles and content, especially for page titles with/without namespace names (the "nsp" parameter), content across language converter and non-language-converter pages.

Usage

edit
  • Content types
    • T: Page title
      • For main namespace only: {{LC zh|T|zh-hans=<zh-Hans page name>|zh-hant=<zh-Hant page name>}}
      • {{LC zh|T|{{{nsp|}}}|<namespace name in en>|zh-hans=<zh-Hans page name>|zh-hant=<zh-Hant page name>}}
      • {{LC zh|T|{{{nsp|}}}|<namespace name in en>|zh-hans=<zh-Hans page name>|zh-hant=<zh-Hant (zh-Hant-TW) page name>|zh-hk=<zh-Hant-HK page name>}}
      • Example:{{LC zh|T|{{{nsp|}}}|Project|zh-hans=关于|zh-hant=關於}}
    • C: Content
      • {{LC zh|C|zh-hans=<zh-Hans content>|zh-hant=<zh-Hant content>}}
      • {{LC zh|C|zh-hans=<zh-Hans content>|zh-hant=<zh-Hant (zh-Hant-TW) content>|zh-hk=<zh-Hant-HK content>}}
      • Example: {{LC zh|C|zh-hans=关于|zh-hant=關於}}

Integration with other templates and modules

edit

Template data

edit
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools.

TemplateData for LC zh

Language conversion template for Chinese script.

Template parameters

ParameterDescriptionTypeStatus
Language Variantvariant

The fixed language variant to output. (e.g. `zh-hans`, `zh-hant`, etc.)

Stringoptional
Content type1

The content type, values:\n* "N" - Namespace Name\n* "T" - Full Page Title\n* "H" - Heading\n* "C" - Text Content\n\n;Aliases\n:"type"

Example
T
Auto value
C
Stringrequired
Hide Namespace Prefix?2

(type=N, T) Whether to hide the namespace prefix (value is passed to [[Template:Localized link]] as the "nsp" parameter).\n\n;Aliases\n:"hide_ns"\n:"nsp"

Auto value
{{{nsp|}}}
Booleanoptional
English Canonical Namespace Name3

(type=N, T) The canonical name of the namespace in English.\n\n;Aliases\n:"ns"\n:"namespace"

Example
Help
Stringoptional
2nd English Canonical Namespace Namens_2

(type=N, T) The canonical name of the secondary pseudo-namespace in English, used for example in Help:Extension:Example

Example
Extension
Stringoptional
English Page Name4

(type=T) The canonical name of the page in English without the namespace prefix (like the PAGENAME variable).

Example
ParserFunctions
Stringoptional
Chinesezh

The text content in Chinese script.

Default
{{{zh-hans|{{{zh-hant}}}}}}
Contentoptional
Simplified Chinesezh-hans

The text content in simplified Chinese script.

Default
{{{zh}}}
Contentsuggested
Traditional Chinesezh-hant

The text content in traditional Chinese script.

Default
{{{zh}}}
Contentsuggested
Chinese (China)zh-cn

The text content in simplified Chinese script.

Default
{{{zh-hans}}}
Contentoptional
Chinese (Hong Kong)zh-hk

The text content in traditional Chinese script used in Hong Kong.

Default
{{{zh-hant}}}
Contentoptional
Chinese (Macau)zh-mo

The text content in traditional Chinese script used in Macau.

Default
{{{zh-hant}}}
Contentoptional
Chinese (Malaysia)zh-my

The text content in simplified Chinese script.

Default
{{{zh-hans}}}
Contentoptional
Chinese (Singapore)zh-sg

The text content in simplified Chinese script.

Default
{{{zh-hans}}}
Contentoptional
Chinese (Taiwan)zh-tw

The text content in traditional Chinese script.

Default
{{{zh-hant}}}
Contentoptional

Edit parameter translations