Globalize for Ruby on Rails
Globalize implements three basic types of translation:
- Dates, currencies, etc: language dependent, but also (often) country/locale dependent. This feature provides convenient methods for relevant data types. 12345.67.localize → 12.345,67
- Content in the database, for specific fields in specific tables: once the translates method is added to the relevant model, the fields indicated with that method call gain the ability to have translated content sitting in the database. An operator (possibly the developer) will need to add these translated texts.
- Arbitrary strings: any string that you would like, with added flexiblity for including parameters (for example: ‘one’ in the singular form of a phrase and an actual number for the plural form)
Using these three mechanisms, all user-facing content ought to be translatable.
Do you want to add a comment? Just Join to become a member.
0 Comments on this resource