Permanently protected template

Difference between revisions of "Template:Ruby"

From Yugipedia
Jump to: navigation, search
(the lang parameter actually uses BCP47/IETF language tags, which are nearly a strict superset of ISO 639-1 and -3 (BCP 47 doesn't follow reassigned ISO 639 tags which means the two could drift apart over time, but currently they match))
({{Documentation}}; rm xml:lang attribute (I rather doubt it's actually needed by anything we ever get reading/scraping the wiki))
Line 1: Line 1:
 
{{ #if: {{{2<includeonly>|</includeonly>}}}
 
{{ #if: {{{2<includeonly>|</includeonly>}}}
   | <ruby class="rubytext ruby-{{{lang|ja}}}" lang="{{{lang|ja}}}" xml:lang="{{{lang|ja}}}"><rb>{{{1}}}</rb><rp>(</rp><rt>{{{2}}}</rt><rp>)</rp></ruby>
+
   | <ruby class="rubytext ruby-{{{lang|ja}}}" lang="{{{lang|ja}}}"><rb>{{{1}}}</rb><rp>(</rp><rt>{{{2}}}</rt><rp>)</rp></ruby>
 
   | {{{1}}}[[Category:Pages with an unnecessary Ruby transclusion]]
 
   | {{{1}}}[[Category:Pages with an unnecessary Ruby transclusion]]
 
}}{{ #ifeq: {{{3|¬}}} | ¬ || [[Category:Ruby transclusions with too many parameters]] }}<noinclude>
 
}}{{ #ifeq: {{{3|¬}}} | ¬ || [[Category:Ruby transclusions with too many parameters]] }}<noinclude>
 
+
{{Documentation}}
<pre>{{Ruby|極|きょく}}{{Ruby|神|しん}}{{Ruby|皇|おう}}ロキ</pre>
 
 
 
Results in {{Ruby|極|きょく}}{{Ruby|神|しん}}{{Ruby|皇|おう}}ロキ
 
 
 
Non-Japanese text must specify the language using an [[wikipedia:IETF language tag|IETF language tag]] (commonly-used ones are "en" for English, "ko" for Korean, and "zh" for Chinese) via the "lang" parameter: <pre>{{Ruby|BF|블랙페더|lang=ko}}-탱구바람 히렌</pre>
 
 
 
Results in {{Ruby|BF|블랙페더|lang=ko}}-탱구바람 히렌 (compare with how it looks without the "lang" parameter: {{Ruby|BF|블랙페더}}-탱구바람 히렌)
 
 
 
Ruby markup is styled with CSS in [[MediaWiki:Common.css]] allowing it to appear properly in Mozilla Firefox, which doesn't natively support the markup.
 
 
 
== See also ==
 
* {{t|Ruby/detect}}
 
* {{t|Ruby/split}}
 
* [[wikipedia:Template:Ruby-ja|Template:Ruby-ja]] on Wikipedia
 
* [[wikipedia:Template:Ruby-zh-b|Template:Ruby-zh-b]] on Wikipedia
 
* [[wikipedia:Template:Ruby-zh-p|Template:Ruby-zh-p]] on Wikipedia
 
 
 
[[Category:Templates]]
 
 
</noinclude>
 
</noinclude>

Revision as of 02:29, 28 March 2016

{{{1}}}({{{2}}})