4.3. Using Message Catalogs

Lojban is culturally fully neutral. Its vocabulary was built algorithmically using today’s six most widely spoken languages: Chinese, Hindi, English, Russian, Spanish, and Arabic.

—What is Lojban?, Nick Nicholas and John Cowan

A message catalog is a collection of messages in a specific language. This is integral to the idea of localization (L10N). The idea is to “isolate” the language-specific strings from the rest of the application so that we can simply “plug in” a different catalog to get messages and strings in a different language.

The “best” way to do this in Ruby is to use the library formally called Ruby-GetText-Package. I’ll simply refer to this as gettext, after the filename of the library; this is not ...

Get The Ruby Way: Solutions and Techniques in Ruby Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.