Start Learning Japanese in the next 30 Seconds with
a Free Lifetime Account

Or sign up using Facebook

Furigana forum tags?

Moderators: Moderator Team, Admin Team

thegooseking
Expert on Something
Posts: 216
Joined: October 17th, 2008 8:24 pm

Furigana forum tags?

Postby thegooseking » May 26th, 2014 10:43 am

Hi everyone,

Right now, if we want to write furigana in the forum, we just have to put it in brackets after the kanji. Which is ok, I guess, but what would be better would be if we could use furigana tags to have the furigana display above the kanji. Fortunately there is an HTML tag that can help us out with this: the ruby tag.

For instance, someone could write [furigana=きょう]今日[/furigana].

This would then be converted to HTML as:-

Code: Select All

<ruby>今日
<rp>(</rp>
<rt>きょう</rt>
<rp>)</rp>
</ruby>

What this means is:-
ruby: indicates that some text needing furigana is incoming.
rp: indicates what browsers that don't support ruby should do (the furigana will be placed after the kanji, so in this case (as in most cases) it's telling non-ruby-supporting browsers to place the furigana within parentheses - technically, it's telling ruby-supporting browsers to ignore the parentheses, since a non-supporting browser will just ignore the tags and display the text as-is).
rt: indicates what the furigana actually is.

Ruby is part of the HTML5 specification, but not all browsers support it. Notably, Firefox still doesn't support it, but Chrome (since 5.0), Safari (since 5.0), Opera (since 15.0) and IE (since 5.5, long before it even became standard!) all support it. For non-supporting browsers, one option is to use the rp tag, as above (which you should always do anyway), but you can also tell users to download an extension to add support (most extensible browsers - including Firefox - have such an extension freely available), or even fake support for it through CSS (though I don't know how well this works).

One more point: I don't know if the forum tags are shared between the other language sites. 'Furigana' is a specifically Japanese name for what we're talking about, but it would also be useful for ChineseClass101 (pīnyīn and bopomofo, but probably mostly just pīnyīn) and KoreanClass101 (for hanja annotations or, more likely, just romanising the hangul) as well as perhaps some of the others, in which case calling the forum tag 'furigana' is needlessly Japanese-specific. Perhaps just call it 'ruby'.

小狼
Get 40% OFF

Return to “Feature Requests”