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

(Tuis.) #1
Rails L10n | 263

Localizing the address book


Now we will localize the address book’s interface so that the interface elements
appear in the language of the user’s choice. First we will install the Globalize plugin.
This can be done by any method of your choice (see Chapter 3 for plugin installa-
tion options), but we will usesvn export:


$ svn export svn://svn.globalize-rails.org/globalize/trunk vendor/plugins/globalize

Globalize comes with a Rake task to set up the tables. Unfortunately, Globalize
trunk is still broken, and it misidentifies user-created translations as built in. To fix
this, immediately after we create the translation tables, we will change thebuilt_in
column of theglobalize_translations table to default tofalse:


Figure 8-4. Adding a person

Free download pdf