Template:Ruby: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
m (yeah i think we're good to allow the use of this template again.)
(Added TemplateData)
 
Line 1: Line 1:
<ruby lang="{{{lang|ja}}}">{{{1}}}<rp>(</rp><rt>{{{2}}}</rt><rp>)</rp></ruby><noinclude>
<ruby lang="{{{lang|ja}}}">{{{1}}}<rp>(</rp><rt>{{{2}}}</rt><rp>)</rp></ruby><noinclude>


Note: Most browsers, including {{wp|Google Chrome|Chrome}}, {{wp|Safari (web browser)|Safari}}, {{wp|Firefox}} (since version 38), {{wp|Internet Explorer}}, and {{wp|Opera (web browser)|Opera}} natively support rendering of {{wp|Ruby character}}s. If you see Japanese kanji followed by oddly spaced kana in parentheses, your browser does not support Ruby. You should see small kana characters rendered directly above the kanji characters.
<div style="border: 2px solid #fc3; background:#fff9ea; {{roundy}}; padding: 5px; margin: 6px 0 6px 0; display: table;">
<div style="display: table-cell; padding: 5px;">[[File:OOjs UI icon lightbulb-yellow.png|text-top|25px]]</div>
<div style="display: table-cell; padding-left: 5px;">Note: Most browsers, including {{wp|Google Chrome|Chrome}}, {{wp|Safari (web browser)|Safari}}, {{wp|Firefox}} (since version 38), {{wp|Internet Explorer}}, and {{wp|Opera (web browser)|Opera}} natively support rendering of {{wp|Ruby character}}s. If you see Japanese kanji followed by oddly spaced kana in parentheses, your browser does not support Ruby. You should see small kana characters rendered directly above the kanji characters.
</div>
</div>


[[Category:Code templates]]</noinclude>
==TemplateData==
<templatedata>
{
"params": {
"1": {
"label": "Base",
"description": "Text in Kana, Kanji or Chinese characters to be annotated",
"example": "全",
"type": "line",
"required": true
},
"2": {
"label": "Annotation",
"description": "Hiragana, romanization or other transcription; shown above the Base text",
"example": "すべ",
"type": "line",
"required": true
},
"lang": {
"label": "Language",
"description": "The language code of the text",
"type": "line",
"default": "ja"
}
},
"description": "This template allows for the inclusion of ruby characters (also known as furigana) above Kana, Kanji or Chinese characters. Some older browsers don't support ruby characters; see the template page for more information.",
"paramOrder": [
"1",
"2",
"lang"
],
"format": "inline"
}
</templatedata>
 
[[Category:Code templates]]
</noinclude>

Latest revision as of 23:20, 29 February 2024

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

OOjs UI icon lightbulb-yellow.png
Note: Most browsers, including Chrome, Safari, Firefox (since version 38), Internet Explorer, and Opera natively support rendering of Ruby characters. If you see Japanese kanji followed by oddly spaced kana in parentheses, your browser does not support Ruby. You should see small kana characters rendered directly above the kanji characters.

TemplateData

This template allows for the inclusion of ruby characters (also known as furigana) above Kana, Kanji or Chinese characters. Some older browsers don't support ruby characters; see the template page for more information.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Base1

Text in Kana, Kanji or Chinese characters to be annotated

Example
Linerequired
Annotation2

Hiragana, romanization or other transcription; shown above the Base text

Example
すべ
Linerequired
Languagelang

The language code of the text

Default
ja
Lineoptional