Advanced Internationalization in Rails http://spkr8.com/t/1910

Description:

Rails includes a standard way to handle internationalization in your applications, but is it sufficient? On a recent project that had to be available in English and Spanish, I found it was not. While Rails implements simple text substitution well, it does not handle inflecting multiple languages. Pluralizing the model name EmergencyContact into Spanish will result in "contacto de emergencias" instead of "contactos de emergencia," for example. This makes using form builders problematic, as well as other automated pluralizations and singularizations. I re-wrote ActiveSupport's inflector and core extensions to respect multiple inflectors per language.

In this talk, we'll examine the changes I made and learn about the core of Rails' internationalization support. Along the way, we'll see how to make your application's translation easier with modern key-value stores like Redis, how to name your models and tables in your native language, and how the changes in Rails 3 will affect internationalization.

comments powered by Disqus

Time & Location

November 26, 2009 — 12:45 PM
Madrid, Spain (Map It)

Event

Conferencia Rails 2009 (1 talk)

November 25-27, 2009