Iteration K1: Selecting the Locale
We start by creating a new configuration file that encapsulates our knowledge of what locales are available and which one is to be used as the default:
|||I18n.default_locale = :en|
|||LANGUAGES = [|
This code is doing two things.
The first thing it does is use the I18n module to set the default locale. I18n is a funny name, but it sure beats typing out internationalization all the time. Internationalization, after all, starts with an i, ends with an n, and has eighteen letters in between.
Then the code defines a list of associations between display names and locale names. ...