About the Talk
November 26th, 2009 7:45 AM
Madrid, SpainMadrid, Spain
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.