Advanced Rails - Building Industrial-Strength Web Apps in Record Time

(Tuis.) #1

236


Chapter 8CHAPTER 8


i18n and L10n 8


Wer fremde Sprachen nicht kennt,
weiß nichts von seiner eigenen.
(He who ignores foreign languages
knows nothing of his own.)
—Goethe


As the reach of the Web expands, developers find that their web applications must
be customized to match the needs of new audiences of different cultures.
Internationalizationis the process of adapting software so that it may be used across
many various cultures and locales.Localizationis the process of actually modifying
the product and creating a version customized for a particular language, country, or


Locale


The difference between internationalization and localization can be fuzzy, and it can
change from situation to situation. As a simplistic example, consider a social net-
working site. At a minimum, internationalization would involve adapting the appli-
cation to accept and display data in a wide variety of character sets (say, by using
UTF-8 for all input, output, and storage). Localization would at least involve transla-
tion of user interface elements to several languages, and possibly much more.


The terminternationalizationis usually abbreviatedi18n, short for “i,
18 letters, and thenn.” Similarly, “localization” is abbreviatedL10n.
To avoid ambiguity, i18n is always written with a lowercasei, while
L10n always uses an uppercaseL. I will use this convention through-
out this chapter.

Locale


Although language translation gets the lion’s share of attention in this field, it is but
one part of i18n. A human language may have significant regional differences or vari-
ants between countries where the language is spoken. Dialects aside, there can be
large differences in currency, collation (sort order), number and date format, and
even writing system across regional or political divisions within a country.

Free download pdf