User:Tiddlywinks/Rubytest/t
fullruby
This template encodes Japanese text so that it is intuitively searchable by various methods. The main text for display is Ruby-annotated text, like 救助隊DXのピカチュウ.
Ruby annotation has two limitations. For searching the wiki, Ruby annotation such as above is read as 救助隊(きゅうじょたい)DX(ディーエックス)のピカチュウ, meaning "救助隊DXの" would not be found by a search. Browsers also ignore Ruby annotations (like きゅうじょたい) for Ctrl+F searches, so the kana cannot be searched within the page.
To resolve these issues, the template takes a kanji-only form of the Ruby text (like 救助隊DXのピカチュウ) and a kana-only form (like きゅうじょたいディーエックスのピカチュウ). The former is embedded so that only the search engine will see it. The latter is hidden behind the Ruby-annotated text so that it will be found by Ctrl+F; this solution is imperfect, but it is currently the best known way to make the kana searchable.
- Unnamed parameters
- 1: full ruby text (ex:
{{ruby|救助隊|きゅうじょたい}}{{ruby|DX|ディーエックス}}のピカチュウ, displays as 救助隊DXのピカチュウ) - 2: kanji only (ex: 救助隊DXのピカチュウ)
- 3: kana only (ex: きゅうじょたいディーエックスのピカチュウ)
- No categories associated with this article