Template:Nihongo

From Len'en Wiki
Jump to navigation Jump to search
Documentation icon Template documentation[view] [edit] [history] [purge]

{{Nihongo}} is a template that standardises the structures of displaying kanji along with an English translation and/or rōmaji. It also helps mark the kanji segment as being in Japanese kanji and/or kana, which helps browsers display it correctly in rescemblance to {{Lang}}.

Usage

Syntax:

Without lead=yes With lead=yes
{{Nihongo|English|kanji/kana|rōmaji|extra|extra2}} {{Nihongo|English|kanji/kana|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. The word as written in Japanese (kanji, kana, Roman letters, and possibly other marks).
  • rōmaji. Optional. Transliteration of the Japanese word, using Hepburn Romanisation.
  • 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. This, however, generally is not needed.
  • 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).

Examples

Regular use
Code {{Nihongo|Dragonfly Castle|蜻蛉乃城|Kagerō-no-Shiro}}
Gives Dragonfly Castle (蜻蛉乃城, Kagerō-no-Shiro)
Use in lead
Code Nihongo|Dragonfly Castle|蜻蛉乃城|Kagerō-no-Shiro|lead=yes}
Gives Dragonfly Castle (Japanese: 蜻蛉乃城, Hepburn: Kagerō-no-Shiro)
Without English
Code {{Nihongo||无|Mu}}
Gives Mu ()
Without English, use in lead
Code {{Nihongo||无|Mu}}
Gives Mu (Japanese: )
With extra
Code

{{Nihongo||照妖鏡|shouyoukyou|extra=lit. "evil-illuminating mirror"}}

Gives

shouyoukyou (照妖鏡, lit. "evil-illuminating mirror") (NB: |extra= isn't necessarily required.)

User Style

User style can be set by adding code similar to

@media screen, tv {
	*[lang="ja"] {
		color: green;
	}
}

to common.css.

See Also

  • {{Lang}}, to define text in a particular language
  • {{zh}}, for use with Chinese text