Template:Nihongo/doc

    From Hokuto no Ken Encyclopedia | HnKWiki

    Usage[edit source]

    This template is basically the same as wikipedia:Template:Nihongo, except that it reverses the order of the English and Rōmaji items' diplay, and relies on a little bit of manual formating for italics and quotation marks; its handling of Kanji (and/or Kana) is the same as that of wikipedia:Template:Nihongo.

    This template is useful when one is addressing a Japanese term directly instead of providing a Japanese translation for an English one, i.e. 'Japanese term in Rōmaji (Kanji version, "English translation")', instead of 'English term (Kanji version, Japanese translation in Rōmaji)'.


    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 the t_nihongo_kanji CSS style class to it.

    Parameters 1, 2 and 3 are required, but the first may be blank (e.g. if the Kanji/Kana and Rōmaji are known but the English is not, use {{Nihongo||Kanji|Rōmaji}}. Using the template without the Rōmaji and Kanji version is essentially pointless, and will result in a useless or worse-than-useless display. Parameters 4 and 5 can also be directly invoked with extra= and extra2=. Parameter extra2 is useful only in ";" definitions (extra2's content will be displayed without bold, whereas text following the template will get the bold); see below for a concrete example.

    Please note:

    • The English parameter (the first one) does not automatically put quotation marks around its content. This may or may not be desired, depending upon the context and content (and as in example below, something else may be done, such as prefacing the English translation with something.
    • The Rōmaji parameter (the third one) does not automatically put its content into italics, which in most cases other than proper names should be done (manually).
    • The order of parameters is fixed, and is intentionally the same as that of wikipedia:Template:Nihongo (despite it being not very intuitive for this template) to make most conversions between the two display formats a simple matter of a one-character change to the template name and some manual quotation mark and italics formatting (or removal thereof if converting from {{Nihongo}} to wikipedia:Template:Nihongo).

    See examples below for usage hints.

    Examples[edit source]

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

    With extra2:

    Code

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

    Gives
    "priest of nothingness" (虚無僧, komusō) [religion]
    Mendicant priest of the Fuke sect of Zen Buddhism.

    The extra2 parameter can be used for links, reference footnote citations, etc.

    Without extra2 (and probably not the desired effect):

    Code

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

    Gives
    "priest of nothingness" (虚無僧, komusō) [religion]
    Mendicant priest of the Fuke sect of Zen Buddhism.

    Example of usage when it is not clear from the context that Japanese is the language in question:

    Code

    {{Nihongo|Japanese for "four balls"|四つ球|'''yotsudama'''}}

    Gives

    Japanese for "four balls" (四つ球, yotsudama)

    Do not use Japanese: "English version" for a case like this, as this colon formatting is used by Wikipedia language templates to indicate that the material that follows the colon is in the language mentioned before the colon, and this different use of this formatting will confuse readers. Use "for" or some other clear wording instead. Also, do not use {{Lang-ja|"English version"}} (which renders as Template:Lang-ja); this even more explicitly signals that the material following the language name is in that language, and the text will appear (as it does in that example) in a different font.

    User style[edit source]

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