Template:ja-r


This is a wrapper for {{l}} that does two things:

  1. automatic romanization (which is italicized here and put in l's tr parameter)
  2. placing of furigana aka ruby over the linked term (the term with furigana is put in l's third unnamed parameter)

The "r" stands for "ruby". This template generates content using the modules Module:ja-link and Module:ja.

Parameters

|1=
The term itself that we want to link to (which is put directly into l's second unnamed parameter)
|2= (if the first term contains non-kana characters)
The term written entirely in kana with regular ASCII spaces between words (so that there will be spaces in the romanization, not relevant to the placing of furigana)
|3= or |gloss= (optional)
Same as the gloss field of l.
|lit=
Literal meaning.
|pos=
Part of speech.
|linkto= (optional)
Make the link point to this. Useful for -na adjectives or suru verbs where you want the link to point to the lemma but be displayed as the form plus suru or -na, e.g. 入手(にゅうしゅ)する (nyūshu suru) which displays 入手する with ruby but points to 入手.
|caps= (optional)
set to any value to capitalize the first letters of each word (for proper nouns)
|rom=
Override the romaji. It can be set to - to disable romaji
|hist=
Use "romaji for the historical kana orthography", e.g. ()はる (wofaru).

For example, {{ja-r|猿も木から落ちる|さる も き から おちる}} produces (さる)()から()ちる (saru mo ki kara ochiru).

Ruby and transliteration

The following description applies to {{ja-r}}, {{ja-usex}}, {{ja-compound}} and all Japanese header templates.

Transliteration format

  • Use a period (full stop) between two kana to force a two consecutive vowels to be transliterated separately rather than as a long vowel.
    {{ja-r|羨ましい|うらやましい}}(うらや)ましい (urayamashī)
    {{ja-r|羨ましい|うらやまし.い}}(うらや)ましい (urayamashii)
  • Spaces and hyphens in the kana text will appear in the transliteration as they are.
    {{ja-r|手に入る|て に はいる}}()(はい) (te ni hairu)
    {{ja-r|理想的|りそう-てき}}理想的(りそうてき) (risō-teki)
  • A caret ^ capitalizes the following letter.
    {{ja-r|任天堂|^ニンテンドー}}任天堂(ニンテンドー) (Nintendō)

Dividing kana between kanji

In certain cases, a manual division of kana between kanji is desired.

In such cases, use a percent sign (%) in both the kanji and kana parameters to determine which kana go above which kanji:

Spaces can also be used, if the corresponding kana contains a space:

  • {{ja-usex|酒飲みに行かない?|さけ のみ に いかない?|Why not go for a drink?}}

    酒飲(さけの)みに()かない?
    Sake nomi ni ikanai?
    Why not go for a drink?
  • {{ja-usex|酒 飲みに行かない?|さけ のみ に いかない?|Why not go for a drink?}}

    (さけ)()みに()かない?
    Sake nomi ni ikanai?
    Why not go for a drink?

The automatic placement of ruby fails in rare cases, for instance when the same kana occurs in both the parameter containing kanji and the parameter containing kana, and the parameter containing kana has two instances of this kana. (Below, the kana in question is .)

Use spaces or percent signs to prevent this. For example:

Special characters

Symbol Name Effect Position
 
Space Add space Kana-reading parameter, sometimes original-form parameter
-
Hyphen Add hyphen Kana-reading parameter only
.
Full stop Stop long vowel detection on this point Kana-reading parameter only
^
Caret Capitalise words Kana-reading parameter only
%
Percent sign Separate ruby above a word Original-form parameter and kana-reading parameter, corresponding needed


TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools.

TemplateData for ja-r

Creates a link to a kanji/kana term with automatic romanization and placing ruby text (furigana) above the kanji

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
kanji/kana1

The term itself that we want to link to (which is put directly into l's second unnamed parameter)

Example
寿司
Pagerequired
kana term2

no description

Example
すし
Lineoptional
gloss3 gloss

no description

Example
sushi
Lineoptional
literal meaninglit

no description

Example
sour rice
Lineoptional
part of speechpos

no description

Example
noun
Lineoptional