Template:Nihongo2/doc: Difference between revisions
Appearance
Changed an example to match best practice |
Deleatur yhe (talk | contribs) m 1 revision imported |
(No difference)
| |
Latest revision as of 06:34, 9 September 2026
| This is a documentation subpage for Template:Nihongo2. It may contain usage information, categories and other content that is not part of the original template page. |
__EXPECTED_UNCONNECTED_PAGE__
| This template is used on approximately 13,000 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 should not be used in citation templates such as Citation Style 1 and Citation Style 2, because it includes markup that will pollute the COinS metadata they produce; see Wikipedia:COinS. |
Usage
- Syntax
| Code | {{Nihongo2|Kanji}}
|
| Gives | Kanji |
This template marks the Kanji segment as being in Japanese Kanji, which helps user agents such as web browsers display it correctly. It also applies the t_nihongo_kanji CSS style.
With the parameter help set to a non-empty value, the template displays a help sign which links to an article describing the writing system.
| Code | {{Nihongo2|Kanji|help=yes}}
|
| Gives | Kanji |
Examples
| Code | In Japanese, {{Nihongo2|虚無僧}} reads {{translit|ja|komusō}}.
|
| Gives | In Japanese, 虚無僧 reads komusō. |
User style
User style can be set by adding code similar to
- *[lang=ja] { color: green; font-family: Arial; }
or
- .t_nihongo_kanji { color: green; font-family: Arial; }
to common.css.
See also
- {{Nihongo}}, also displays kanji properly, along with Romaji and optional notes, inside parentheses, with the English version before the parentheses.
- {{Nihongo3}}, essentially the same as {{Nihongo}}, but gives Romaji first and English inside the parentheses
- {{Nihongo krt}}, essentially the same as this template, but with rōmaji and English inside the parentheses
- {{Nihongo-s}}, a simplified version of {{Nihongo}} without the extra spans or checks
- {{Nihongo foot}}, same as {{Nihongo}}, but puts everything but the English into a footnote.
<templatedata>
{
"params": {
"1": {
"label": "Kanji/kana text",
"type": "string",
"required": true
},
"help": {
"description": "If given, shows a help link as superscript",
"type": "string"
}
},
"description": "Marks text as Japanese, optionally displaying a help sign"
}
</templatedata>