Template:Conversion-zh/doc: Difference between revisions

From Test Wiki
Jump to navigation Jump to search
m>SunAfterRain
Created page with "{{Documentation subpage}} {{lua|Module:Conversion-zh}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> The Conversion-zh template can be used as an alternative to the regular traditional/simplified conversion functionality (<code><nowiki>-{zh:; zh-hans:; zh-hant:; zh-cn:; ...}-</nowiki></code>) when it doesn't work, such as for <!-- converting images (it is recommended to use {{tl|Image}}) or --> converting prompt texts. How..."
 
m 1 revision imported
Tags: Mobile edit Mobile web edit
 
(No difference)

Latest revision as of 12:08, 16 November 2025

__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=马新
}}