Difference between revisions of "Template:Infobox Chinese/Blank"
Jump to navigation
Jump to search
imported>Trappist the monk (lang function name change;) |
imported>Trappist the monk (lang function name change;) |
||
| Line 5: | Line 5: | ||
| labelstyle = font-weight:normal; | | labelstyle = font-weight:normal; | ||
| − | | header1 = {{#ifeq:{{{header|{{{blank_header|}}}}}}|none||{{{header|{{{blank_header|{{#if:{{#invoke:Lang| | + | | header1 = {{#ifeq:{{{header|{{{blank_header|}}}}}}|none||{{{header|{{{blank_header|{{#if:{{#invoke:Lang|is_ietf_tag|{{{lang}}}}}|{{#invoke:Lang|name_from_tag|{{{lang}}}}}|{{{lang}}}}} name}}}}}}}} |
| label2 = {{#if:{{#invoke:Lang|is_ietf_tag|{{{lang}}}}}|[[{{{lang_article|{{#invoke:Lang|name_from_tag|{{{lang}}}}} language}}}|{{#invoke:Lang|name_from_tag|{{{lang}}}}}]]|{{{lang}}}}} | | label2 = {{#if:{{#invoke:Lang|is_ietf_tag|{{{lang}}}}}|[[{{{lang_article|{{#invoke:Lang|name_from_tag|{{{lang}}}}} language}}}|{{#invoke:Lang|name_from_tag|{{{lang}}}}}]]|{{{lang}}}}} | ||
| data2 = {{#if:{{#invoke:Lang|is_ietf_tag|{{{lang}}}}}|{{lang|{{{lang}}}|{{{lang_content}}}}}|{{{lang_content|}}}}} | | data2 = {{#if:{{#invoke:Lang|is_ietf_tag|{{{lang}}}}}|{{lang|{{{lang}}}|{{{lang_content}}}}}|{{{lang_content|}}}}} | ||
Latest revision as of 13:02, 20 October 2019
This child infobox template is for showing translations of something. If not being used within any other infobox, place {{Infobox Chinese/Header}} before it and {{Infobox Chinese/Footer}} after it.
Usage
Alone
Template:Parameter names example
| Template:PAGENAMEBASE |
{{Infobox Chinese/Header
| title = <!-- Box title (Default is the article title) -->
| float = <!-- left|right|none (Default float position is right) -->
| collapse = <!-- yes|no -->
| pic = <!-- Image -->
| piccap = <!-- Image caption -->
| picsize = <!-- 200px (Default is 260px) -->
| pictooltip = <!-- Image 1 tooltip (use for [[WP:ALT|alt text]]) -->
| pic2 = <!-- Additional image -->
| piccap2 = <!-- Caption 2 -->
| picsize2 = <!-- 200px (Default is 260px) -->
| pic2tooltip = <!-- Image 2 tooltip -->
}}
{{Infobox Chinese/Blank
| header = <!-- Custom header -->
| lang = <!-- ISO 639 code -->
| lang_content = <!-- Translation -->
}}
{{Infobox Chinese/Footer}}
As a child infobox
Template:Parameter names example{{Infobox Chinese/Blank
| header = <!-- Custom header -->
| lang = <!-- ISO 639 code -->
| lang_content = <!-- Translation -->
}}
Parameters
See the documentation of Template:Infobox Chinese/Header for further information.
- blank_header
- Custom header text. Usually not needed
- lang
- Two- or three-letter ISO 639 code of the language of the translation
- lang_content
- Translation
Examples
| Germany | |
Flag of Germany | |
| German name | |
|---|---|
| German | Deutschland |
{{Infobox Chinese/Header
| title = Germany
| pic = Flag of Germany.svg
| piccap = Flag of Germany
}}
{{Infobox Chinese/Blank
| lang = de
| lang_content = Deutschland
}}
{{Infobox Chinese/Footer}}
TemplateData
Child infobox for showing a simple translation
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Header | header blank_header | Custom header; specify "none" to hide the header | String | optional |
| ISO 639 code | lang | ISO 639 code for the language of the description
| String | required |
| Article link | lang_article | Custom link from the language name | Page | optional |
| Translation | lang_content | Translation | String | required |
| The above documentation is transcluded from Template:Infobox Chinese/Blank/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |