Template:Conversion-zh/doc

From Test Wiki
Jump to navigation Jump to search

__EXPECTED_UNCONNECTED_PAGE__

Lua error: Module:TNT:172: '''Missing JsonConfig extension, or not properly configured; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Lua banner.tab. See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates'''.

The Conversion-zh template can be used as an alternative to the regular traditional/simplified conversion functionality (-{zh:; zh-hans:; zh-hant:; zh-cn:; ...}-) when it doesn't work, such as for converting prompt texts. However, the Conversion-zh template operates based on the interface language rather than language variants, so it cannot be changed using the typography tags at the top of the page. In other words, when it is possible to use -{}- for conversion, please avoid using the Conversion-zh template.

The implementation mechanism of the Conversion-zh template is completely different from -{}-. The Conversion-zh template automatically switches content between zh, zh-hans, zh-hant, zh-cn, zh-tw, zh-hk, and zh-sg by retrieving the value from MediaWiki:Lang. Therefore, the Conversion-zh template supports code conversion, which is not available in -{}-.

{{lan-zh
|zh=原文
|zh-hans=简体中文
|zh-hant=繁體中文
|zh-cn=大陆
|zh-tw=台灣
|zh-hk=港澳
|zh-sg=马新
}}