සැකිල්ල:ja-r/documentation
This is a wrapper for {{l}}
that does two things:
- automatic romanization (which is italicized here and put in l's tr parameter)
- 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)
|self=
(optional)- if set to
true
, links referring to the page the link is on are displayed in bold (akin to{{l-self}}
and{{m-self}}
) |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.
- Spaces and hyphens
‐
in the kana text will appear in the transliteration as they are. - A caret
^
capitalizes the following letter.
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:
{{ja-r|物 の 哀れ|もの の あわれ}}
produces 物の哀れ (mono no aware){{ja-r|物%の%哀れ|もの %の% あわれ}}
produces 物の哀れ (mono no aware)
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
[සංස්කරණය]TemplateData for ja-r
Creates a link to a kanji/kana term with automatic romanization and placing ruby text (furigana) above the kanji
Parameter | Description | Type | Status | |
---|---|---|---|---|
kanji/kana | 1 | The term itself that we want to link to (which is put directly into l's second unnamed parameter)
| Page name | required |
kana term | 2 | no description
| Line | optional |
gloss | 3 gloss | no description
| Line | optional |
literal meaning | lit | no description
| Line | optional |
part of speech | pos | no description
| Line | optional |