Features
Translation
- Supports translation of views and db content.
- Supports pluralization, even in languages with multiple plural forms like Polish, via the String division method (’/’).
- Automatic routing to locale-specific templates (e.g. show.es-ES.rhtml).
- Automatically chooses locale-specific ActionMailer template.
Easy to Use
- It’s transparent: You’ll mostly just use
Locale.set,"string".t, andtranslates :field. The rest is automatic. - All translation and localization data is in three database tables:
globalize_countries,globalize_languages, andglobalize_translations. - Comes with a free
Currencyclass, especially designed for Rails. Prints out numbers correctly for each locale, and supports currency formatting (¥2300.00, 23 000,00 kr). Values are stored internally and in the database as integers, for maximum precision.
Built-in Data
- Comprehensive list of 7599 languages and 239 countries, with pluralization rules, native language names (Spanish is Español) and number formatting.
- Supplies Time#localize and Date#localize to print out times and dates in strftime format in 92 languages. Other languages can be added by simply supplying translations.
Efficiency
- Efficient querying for db translations. One DB call loads models and translations for current language.
- Additionally, there’s a piggyback feature for associations. So,
Product.find(:all, :include_translated => :manufacturer)is one DB call, but gives youproduct.manufacturer_namein your current language. - Caches view translations to cut down on db queries.
Databases
- Supports PostgreSQL, MySQL and Sqlite3
And, it’s ridiculously easy to add to your app.
Comparison to others
Globalize is generally said to be the most powerful all-in-one solution for Internationalization of Ruby on Rails applications.
(more to come soon … until then please refer to the comparison on the Rails wiki.)
revision 2 · 26.06.08 12:41 · by: Sven