Template:Nihongo/doc

From Wikipedia, the free encyclopedia

This is a documentation subpage for Template:Nihongo (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

Contents

[edit] Usage

For more details on when to use this template, see Wikipedia:Manual of Style (Japan-related articles).
Syntax
Code {{Nihongo|English|Kanji|Romaji|extra|extra2}}
Gives English (Kanji Romaji?, 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).

[edit] Examples

Code {{Nihongo|'''Motojirō Kajii'''|梶井 基次郎|Kajii Motojirō|1901–1932}}
Gives Motojirō Kajii (梶井 基次郎 Kajii Motojirō?, 1901–1932)

With extra2:

Code

; {{Nihongo|komusō|虚無僧|extra2="Priest of nothingness"}}
: Mendicant priest of the Fuke sect of Zen Buddhism.

Gives
komusō (虚無僧?) "Priest of nothingness"
Mendicant priest of the Fuke sect of Zen Buddhism.

Without extra2:

Code

; {{Nihongo|komusō|虚無僧}} "Priest of nothingness"
: Mendicant priest of the Fuke sect of Zen Buddhism.

Gives
komusō (虚無僧?) "Priest of nothingness"
Mendicant priest of the Fuke sect of Zen Buddhism.

[edit] 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.

[edit] 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 parentheses, without Romaji and without the extra parameters