on date with the following sequence: a day name, the day, the month and the year.
In Japan, when you learn the language, you may need to give the sound equivalent of the words in a specific scripting system, so readers will be able to pronounce it.
- Base text: “??”
- Ruby as pronounciation description with Hiragana “???”, Katakana “???” or Romaji “nihon”
How to write it?
<p><ruby> <rb>日本</rb> <rt>nihon</rt> </ruby></p>
In a similar way for chinese language.
- Base text: ?
- Ruby as pronunciation description with pin-yin “hao”
Linguistic morphological glossing
You might want to explain in a sentence which part is a noun and which part is a verb. For example, at school, when you teach grammar to children.
- Base text: “I like fish”
- Ruby as morphological glossing: Noun (for “I”) Verb (for “like”) Noun (for “fish”)
Expression of “invisible” units in a text
The base text contains a Japanese sentence “Yesterday I went to Shibuya”. The pronoun “I” is usually omitted in the original, which makes it hard to understand for e.g. beginning Japanese language learners.
The ruby text above the base text explains what is omitted. The first ruby text line below the base text contains a romanized vesion. The second ruby text line below the base text contains morpho-lexical information. The abbreviations: “TM” means “topic marker”, “DM” means “direction marker”.
Adding information about gestures to conversation transcriptions
- Base text: “And we bought a biiiig icecream.”
- Ruby can be used to mark up “biiig” and to add information about gestures. It could be for example an image of someone making the gesture and big eyes.
Expressing non-segmentable word boundaries
This is useful for
- a contraction (Old High German, English, many other languages)
- a compound word (Sanskrit, Avestan, many other languages)
- a group of words whose forms have been affected by “euphonic” sandhi changes (Sanskrit, Breton)
- a group of words in which, for orthographic or other reasons, the word junctions are not indicated (Sanskrit, Japanese)
An example from Japanese:
- base text: yo-mu (means: “reading in the base form”; with the Japanese syllabic script, the boundaries between the morphemes “yom” and “m” cannot be expressed)
- Ruby for a segmentation of morphological boundaries: contains a romanized version of “yomu” with the correct boundaries “yom-mu”.
Implementations: Sunny side-up?
Using the Live DOM Viewer I tried to figure out more or less how it works. Not everything is covered, but the basic parsing rules are here; simple research.
We have not found an implementation report of Ruby in different browsers, user agents and in authoring tools (the too often forgotten ones). If someone could create an implementation report using the Ruby Annotation Test Cases developed by ???? and also the Ruby Test Cases developed by Internationalization Activity, it would help to have a good picture of the implementation landscape. Simple Ruby annotations are implemented in Amaya. There is also an xpi extension for Ruby which is available for Firefox and Mozilla and help to visualize simple and complex ruby annotation. Unfortunately it’s not a native implementation in Mozilla rendering engine, which has still an open issue for Ruby markup.
So we are not there yet, but I would say that almost all the information is available for helping developers to implement in their products but there are real benefits using ruby in a page. For example, we found this page giving a table which contains the birthplaces and native names of celebrities (actors, singers, sports figures, etc.) in different languages. (to see with Firefox and the XPI extension).
Any comments or additional information are welcome, specifically from the internationalization specialists… ;)
More information / Reminder
- FAQ: What is Ruby?
- Tutorial: Ruby Markup and Styling
- Test Materials for Ruby
- Ruby at Wikipedia
- Translations of Ruby Specification in different languages
- Screenshot of ruby rendered in Firefox 1.5
- Screenshot of ruby rendered in Amaya
- XPI extension to have a rendering of ruby in 