Template:Nihongo foot/doc
This is a documentation subpage for Template:Nihongo foot. It contains usage information, categories and other content that is not part of the original template page. |
Usage
Syntax
{{Nihongo foot|English|Kanji|Rōmaji|extra|extra2|post=,|group=group}} <references group="group" /> |
English,[group 1]
|
This template marks the Kanji
segment as being in Japanese Kanji, which helps user agents (web browsers and so on) to display it correctly. It also applies the t_nihongo_kanji
CSS class. The footnote generated is called using the <references />
.
Parameters
- English. Optional. The word as translated into English. Note that this will sometimes be the actual Japanese word due to it being adopted into English.
- Kanji. Required. The word in Japanese kanji and/or kana, the logographic writing system.
- Romaji. Optional. The word in Japanese Romaji, the Romanized syllabic writing system used for foreign words. Equivalent to transliteration.
- extra. Optional. Can also be expressed as a named parameter,
extra=
. - extra2. Optional. Can also be expressed as a named parameter,
extra2=
. It is only useful in ";" definitions (extra2 will be displayed without bold, whereas text following the template will get the bold). - post. Optional. Additional characters, such as commas, added after the visible English name but before the reference.
- group. Optional. Can be used to define a custom references group. The group is then called by using
<references group="group" />
instead of the normal<references />
. - lead=yes. Optional. This should be used for the first instance, usually a footnote in the lead. It gives the reader an idea what kind of non-English writing they are viewing.
Examples
Regular use
{{Nihongo foot|English|英語|eigo}} <references /> |
English[1]
|
With group defined
{{Nihongo foot|English|英語|eigo|group=nb}} <references group="nb" /> |
English[nb 1]
|
User style
User style can be set by adding code similar to
<source lang="css"> @media screen, tv { *[lang="ja"] { color: green; } }</source>
or
<source lang="css"> @media screen, tv { .t_nihongo_kanji { color: green; } } </source> to your common.css.
See also
- {{Nihongo}}, original: generates everything that is in a footnote inside parenthesis
- {{Nihongo3}}, essentially the same as {{Nihongo}}, but gives Romaji first and English inside the parentheses
- {{Nihongo2}}, also displays the kanji properly, but without adding anything in parentheses, without Romaji and without the extra parameters
- {{Nihongo-s}}, a simplified version of {{Nihongo}} without the extra spans or checks
<templatedata>
{
"params": {
"1": {
"label": "English text",
"example": "English",
"type": "string",
"suggested": true
},
"2": {
"label": "Kana/kanji text",
"example": "英語",
"type": "string",
"required": true
},
"3": {
"label": "Romanized (rōmaji) text",
"example": "eigo",
"type": "string",
"suggested": true
},
"lead": {
"label": "Label writing systems",
"description": "If 'yes', shows \"Japanese: \", etc., as leads",
"example": "yes",
"type": "string"
},
"extra": {
"aliases": [
"4"
],
"label": "First extra text",
"type": "string"
},
"extra2": {
"aliases": [
"5"
],
"label": "Second extra text",
"type": "string"
},
"group": {
"label": "Footnote reference group",
"type": "string",
"suggested": true
}
},
"description": "Like error: {{nihongo}}: Japanese or romaji text required (help), allows kanji/kana and rōmaji text, but puts them in footnotes"
}
</templatedata>