Difference between revisions of "Template:Name"
Dinoguy1000 (talk | contribs) (switch to Property:Ruby Japanese name) |
Dinoguy1000 (talk | contribs) (only use the module if the name's length is over 1000 characters, to avoid script timeout errors on pages with hundreds of transclusions) |
||
Line 1: | Line 1: | ||
− | {{ #if: {{{1|}}} | {{ # | + | {{ #if: {{{1|}}} | {{ #vardefine: $card_name-localname | {{ #ask: [[{{ #vardefineecho: $card_name-name | {{ PAGENAME: {{{1}}} }} }}]] |
− | |?{{ #switch: {{ln|{{{2}}}}} | + | |?{{ #switch: {{ln|{{{2}}}}} |
− | + | | ja = {{ #if: {{ #show: {{ #var: $card_name-name }} |?Ruby Japanese name }} | Ruby }} Japanese name | |
− | + | | de = German name | |
− | + | | ko = Korean name | |
− | + | | zh = Chinese name | |
− | + | | fr = French name | |
− | + | | pt = Portuguese name | |
− | + | | it = Italian name | |
− | + | | es = Spanish name | |
− | + | | #default = {{ #ifeq: {{rg|{{{2}}}}} | AE | {{ #if: {{ #show: {{ #var: $card_name-name }} |?Asian-English name }} | Asian- }} }}English name | |
+ | }} | ||
+ | | format = template | ||
+ | | template = echo | ||
+ | | mainlabel = - | ||
+ | | limit = 1 | ||
+ | | searchlabel = | ||
+ | | sort = modification date | ||
+ | | order = desc | ||
+ | }} }}{{ #ifexpr: {{ #len: {{ #var: $card_name-localname }} }} < 1000 | ||
+ | | {{ #explode: {{ #explode: {{ #var: $card_name-localname }} | ]] | 1 }} | {{!((}} }} | ||
+ | | {{ #invoke: string | match | {{ #var: $card_name-localname }} | %[%[SMW::off%]%](.*)%[%[SMW::on%]%] }} | ||
}} | }} | ||
− | + | }}<noinclude> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{t|Card name}} generates the name of a card from the Semantic property. | {{t|Card name}} generates the name of a card from the Semantic property. | ||
Revision as of 21:03, 18 May 2016
{{Card name}} generates the name of a card from the Semantic property.
For example:
- {{Card name|Dark Magician|en}} → Dark Magician
- {{Card name|Dark Magician|ae}} → Dark Magician
- {{Card name|Dark Magician|de}} → Dunkler Magier
- {{Card name|Dark Magician|ja}} → ブラック・マジシャン
- {{Card name|Blue-Eyes White Dragon|ja}} →
青眼の白龍 - {{Card name|Blue-Eyes White Dragon|ae}} → Blue-Eyes White Dragon