قالب:يابانية
Usage
- Syntax
Code | {{Nihongo|English|Kanji|Rōmaji|extra|extra2}}
|
Gives | English (Kanji, Rōmaji, extra) extra2 |
This template marks the Kanji
segment as being in Japanese Kanji, which helps web browsers display it correctly. It also applies it the t_nihongo_kanji CSS style class.
Parameters 1 and 2 are required. Parameters 4 and 5 can also be directly invoked with extra=
and extra2=
. Parameter extra2 is useful only in ";" definitions (extra2 will be displayed without bold, whereas text following the template will get the bold).
Examples
Regular use:
Code | {{Nihongo|'''Motojirō Kajii'''|梶井 基次郎|Kajii Motojirō|1901–1932}}
|
Gives | Motojirō Kajii (梶井 基次郎, Kajii Motojirō, 1901–1932) |
Without English:
Code | {{Nihongo||梶井 基次郎|Kajii Motojirō|1901–1932}}
|
Gives | Kajii Motojirō (梶井 基次郎, 1901–1932) |
With extra2
:
Code |
|
Gives |
|
Without extra2
:
Code |
|
Gives |
|
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 common.css.
See also
- {{Nihongo3}}, essentially the same as this template, 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 title}}, same as this version, but formatted for long titles.
The above documentation is transcluded from قالب:يابانية/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |