ಟೆಂಪ್ಲೇಟು:Nihongo foot
This template is used on approximately ೨,೯೦೦ pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
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 />
.
Usage
[ಬದಲಾಯಿಸಿ]Syntax
[ಬದಲಾಯಿಸಿ]{{Nihongo foot|English|Kanji|Rōmaji|extra|extra2|post=,|group=group|ref_name=name}} <references group="group" />
Outputs:
English,[group ೧]
- ↑ Kanji, Rōmaji, extra extra2
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/kana>. Required when <rōmaji> is empty or omitted. The word as written using Japanese script (kanji, kana).
- <rōmaji>. Required when <kanji/kana> is empty. Transliteration of the Japanese word, using Hepburn Romanization.
- <extra>. Optional. Can be used to add a gloss (particularly if there is no English form). 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). - lead=yes. Optional. This should be used for the first instance of Japanese, usually in the lead. It gives the reader an idea what kind of non-English writing they are viewing.
- post=<postscript>. Optional. Additional characters, such as commas, added after the visible English name but before the reference.
- group<group name>. 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 />
. - ref_name<name>. Optional. Can be used to define a custom reference name. Use when the note is called multiple times with the same value on a page.
- 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[೧]
|
With group defined
[ಬದಲಾಯಿಸಿ]{{Nihongo foot|English|英語|eigo|group=nb}} <references group="nb" /> |
English[nb ೧]
|
User style
[ಬದಲಾಯಿಸಿ]User style can be set by adding code similar to
@media screen, tv {
*[lang="ja"] {
color: green;
}
}
or
@media screen, tv {
.t_nihongo_kanji {
color: green;
}
}
to your common.css.
Error messaging
[ಬದಲಾಯಿಸಿ]This template emits one error message of its own:
- error: {{nihongo foot}}: Japanese or romaji text required
One of the positional parameters <kanji/kana>
({{{2}}}
), the 'Japanese' referred to in the error message or <rōmaji>
({{{3}}}
) is required for proper operation of this template. Articles with these errors are collected in ವರ್ಗ:Nihongo template errors (೦).
This error often occurs because the template is malformed:
{{Nihongo foot|東京タワー}}
instead of{{Nihongo foot||東京タワー}}
; 東京タワー is in{{{1}}}
(<English>
) instead of{{{2}}}
(<kanji/kana>
). To resolve this error, add the missing pipe (|
).
Because this template uses {{lang}}
and {{transl}}
which emit their own error messages, see the help text for those at:
- Category:Lang and lang-xx template errors – for error messages emitted by
{{lang}}
- Category:Transliteration template errors – for error messages emitted by
{{transl}}
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{{Nihongo krt}}
, essentially the same as{{Nihongo}}
, but gives kanji first with rōmaji 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
Like {{Nihongo}}, allows kanji/kana and rōmaji text, but puts them in footnotes
ಪರಿಮಿತಿ | ವಿವರ | ನಮೂನೆ | ಸ್ಥಾನಮಾನ | |
---|---|---|---|---|
English text | 1 | no description
| String | ಸೂಚಿಸಲ್ಪಟ್ಟ |
Kana/kanji text | 2 | no description
| String | required |
Romanized (rōmaji) text | 3 | no description
| String | ಸೂಚಿಸಲ್ಪಟ್ಟ |
Label writing systems | lead | If 'yes', shows "Japanese: ", etc., as leads
| String | ಐಚ್ಛಿಕ |
First extra text | extra 4 | no description | String | ಐಚ್ಛಿಕ |
Second extra text | extra2 5 | no description | String | ಐಚ್ಛಿಕ |
Footnote reference group | group | no description | String | ಸೂಚಿಸಲ್ಪಟ್ಟ |