Difference between revisions of "Template:Translation"
From Nookipedia, the Animal Crossing wiki
(Moving usage info to documentation page) |
m (Increasing number of characters required to reduce list to one column) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{# | + | {{#vardefine:length1|{{#expr:{{#len:{{{ja-name|Unknown}}}}} + {{#len:{{{zh-name|Unknown}}}}} + {{#len:{{{zht-name|Unknown}}}}}}} |
+ | }}{{#vardefine:length2|{{#expr:{{#len:{{{ko-name|Unknown}}}}} + {{#len:{{{fr-name|Unknown}}}}} + {{#len:{{{frq-name|Unknown}}}}}}} | ||
+ | }}{{#vardefine:length3|{{#expr:{{#len:{{{it-name|Unknown}}}}} + {{#len:{{{es-name|Unknown}}}}} + {{#len:{{{esl-name|Unknown}}}}}}} | ||
+ | }}{{#vardefine:length4|{{#expr:{{#len:{{{de-name|Unknown}}}}} + {{#len:{{{nl-name|Unknown}}}}} + {{#len:{{{ru-name|Unknown}}}}}}} | ||
+ | }}{{#ifexpr:({{#expr:{{#var:length1}}>55}}+{{#expr:{{#var:length2}}>55}}+{{#expr:{{#var:length3}}>55}}+{{#expr:{{#var:length4}}>55}})>=1| | ||
+ | <div style="text-align:left; line-height:1em; display:inline-block;"> | ||
+ | [[File:Flag of Japan.png|Japanese|link=|14px]] <span style="font-size:.75em;">{{#if:{{{ja-name|}}}|{{{ja-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
+ | [[File:Flag of the People's Republic of China.png|Simplified Chinese|link=|14px]] <span style="font-size:.75em;">{{#if:{{{zh-name|}}}|{{{zh-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
+ | [[File:Flag of Hong Kong.png|Traditional Chinese|link=|14px]] <span style="font-size:.75em;">{{#if:{{{zht-name|}}}|{{{zht-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
+ | [[File:Flag of Korea.png|Korean|link=|14px]] <span style="font-size:.75em;">{{#if:{{{ko-name|}}}|{{{ko-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
+ | [[File:Flag of France.png|French|link=|14px]] <span style="font-size:.75em;">{{#if:{{{fr-name|}}}|{{{fr-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
+ | [[File:Flag of Quebec.png|Quebec French|link=|14px]] <span style="font-size:.75em;">{{#if:{{{frq-name|}}}|{{{frq-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
+ | [[File:Flag of Spain.png|Spanish|link=|14px]] <span style="font-size:.75em;">{{#if:{{{es-name|}}}|{{{es-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
+ | [[File:Flag of Mexico.png|Latin American Spanish|link=|14px]] <span style="font-size:.75em;">{{#if:{{{esl-name|}}}|{{{esl-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
+ | [[File:Flag of Italy.png|Italian|link=|14px]] <span style="font-size:.75em;">{{#if:{{{it-name|}}}|{{{it-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
+ | [[File:Flag of Russia.png|Russian|link=|14px]] <span style="font-size:.75em;">{{#if:{{{ru-name|}}}|{{{ru-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
+ | [[File:Flag of Germany.png|German|link=|14px]] <span style="font-size:.75em;">{{#if:{{{de-name|}}}|{{{de-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
+ | [[File:Flag of the Netherlands.png|Dutch|link=|14px]] <span style="font-size:.75em;">{{#if:{{{nl-name|}}}|{{{nl-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span> | ||
+ | </div> | ||
+ | |{{#ifexpr:({{#expr:{{#var:length1}}>{{{max-length|30}}}}}+{{#expr:{{#var:length2}}>{{{max-length|30}}}}}+{{#expr:{{#var:length3}}>{{{max-length|30}}}}}+{{#expr:{{#var:length4 }}>{{{max-length|30}}}}})>=1| | ||
<div style="text-align:left; line-height:1em; display:inline-block;"> | <div style="text-align:left; line-height:1em; display:inline-block;"> | ||
[[File:Flag of Japan.png|Japanese|link=|14px]] <span style="font-size:.75em;">{{#if:{{{ja-name|}}}|{{{ja-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | [[File:Flag of Japan.png|Japanese|link=|14px]] <span style="font-size:.75em;">{{#if:{{{ja-name|}}}|{{{ja-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
Line 33: | Line 52: | ||
[[File:Flag of Mexico.png|Latin American Spanish|link=|14px]] <span style="font-size:.75em;">{{#if:{{{esl-name|}}}|{{{esl-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | [[File:Flag of Mexico.png|Latin American Spanish|link=|14px]] <span style="font-size:.75em;">{{#if:{{{esl-name|}}}|{{{esl-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span><br> | ||
[[File:Flag of Russia.png|Russian|link=|14px]] <span style="font-size:.75em;">{{#if:{{{ru-name|}}}|{{{ru-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span> | [[File:Flag of Russia.png|Russian|link=|14px]] <span style="font-size:.75em;">{{#if:{{{ru-name|}}}|{{{ru-name|}}}|{{Colorshow|{{{color|ccc}}}|Unknown}}}}</span> | ||
− | </div>}}<noinclude>{{Documentation}} | + | </div>}}}}<noinclude>{{Documentation}} |
[[Category:Templates]]</noinclude> | [[Category:Templates]]</noinclude> |
Revision as of 01:56, February 12, 2021
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Unknown
Template documentation (view)
For use in Infobox-style templates to display translation information. Will appear as two columns if the length of the page or the name
parameter is greater than 12 characters.
spacing
can be used to adjust the padding in between the translation columns.max-length
can be used to change the character count/force the 2-column or 3-column display. The default value is 30. Increasing the value creates a tendency towards a 3-column display, decreasing it, a 2-column display.
Usage
{{Translation | name = <optional> | color = <hexcode (no preceding '#')> | length = <optional> | spacing = <optional> | ja-name = <japanese> | ko-name = <korean> | zh-name = <chinese (simplified)> | zht-name = <chinese (traditional)> | fr-name = <french> | frq-name = <french (quebec)> | es-name = <spanish> | esl-name = <spanish (latin america)> | it-name = <italian> | de-name = <german> | nl-name = <dutch> | ru-name = <russian> }}