aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/i18n.md
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-10-11 01:05:14 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-10-11 01:05:14 +0530
commitf638ef951b4d185b2bfd3d0d8be241cb23001890 (patch)
tree6fc5b981d4e8cc148ff5a63d6a753804247db375 /guides/source/i18n.md
parent3401d5089ba4802b6554483a4de7739e6f914e50 (diff)
parent26ec070b09ceb798b471fd6999ae1da319120899 (diff)
downloadrails-f638ef951b4d185b2bfd3d0d8be241cb23001890.tar.gz
rails-f638ef951b4d185b2bfd3d0d8be241cb23001890.tar.bz2
rails-f638ef951b4d185b2bfd3d0d8be241cb23001890.zip
Merge branch 'master' of github.com:lifo/docrails
Conflicts: activerecord/lib/active_record/persistence.rb railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb
Diffstat (limited to 'guides/source/i18n.md')
-rw-r--r--guides/source/i18n.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/i18n.md b/guides/source/i18n.md
index a3c6b514a4..eda1881e73 100644
--- a/guides/source/i18n.md
+++ b/guides/source/i18n.md
@@ -94,13 +94,13 @@ This means, that in the `:en` locale, the key _hello_ will map to the _Hello wor
The I18n library will use **English** as a **default locale**, i.e. if you don't set a different locale, `:en` will be used for looking up translations.
-NOTE: The i18n library takes a **pragmatic approach** to locale keys (after [some discussion](http://groups.google.com/group/rails-i18n/browse_thread/thread/14dede2c7dbe9470/80eec34395f64f3c?hl=en), including only the _locale_ ("language") part, like `:en`, `:pl`, not the _region_ part, like `:en-US` or `:en-GB`, which are traditionally used for separating "languages" and "regional setting" or "dialects". Many international applications use only the "language" element of a locale such as `:cs`, `:th` or `:es` (for Czech, Thai and Spanish). However, there are also regional differences within different language groups that may be important. For instance, in the `:en-US` locale you would have $ as a currency symbol, while in `:en-GB`, you would have £. Nothing stops you from separating regional and other settings in this way: you just have to provide full "English - United Kingdom" locale in a `:en-GB` dictionary. Various [Rails I18n plugins](http://rails-i18n.org/wiki) such as [Globalize2](ht)
+NOTE: The i18n library takes a **pragmatic approach** to locale keys (after [some discussion](http://groups.google.com/group/rails-i18n/browse_thread/thread/14dede2c7dbe9470/80eec34395f64f3c?hl=en), including only the _locale_ ("language") part, like `:en`, `:pl`, not the _region_ part, like `:en-US` or `:en-GB`, which are traditionally used for separating "languages" and "regional setting" or "dialects". Many international applications use only the "language" element of a locale such as `:cs`, `:th` or `:es` (for Czech, Thai and Spanish). However, there are also regional differences within different language groups that may be important. For instance, in the `:en-US` locale you would have $ as a currency symbol, while in `:en-GB`, you would have £. Nothing stops you from separating regional and other settings in this way: you just have to provide full "English - United Kingdom" locale in a `:en-GB` dictionary. Various [Rails I18n plugins](http://rails-i18n.org/wiki) such as [Globalize2](https://github.com/joshmh/globalize2/tree/master) may help you implement it.
The **translations load path** (`I18n.load_path`) is just a Ruby Array of paths to your translation files that will be loaded automatically and available in your application. You can pick whatever directory and translation file naming scheme makes sense for you.
NOTE: The backend will lazy-load these translations when a translation is looked up for the first time. This makes it possible to just swap the backend with something else even after translations have already been announced.
-The default `application.rb` files has instructions on how to add locales from another directory and how to set a different default locale. Just uncomment and edit the specific lines.
+The default initializer `locale.rb` file has instructions on how to add locales from another directory and how to set a different default locale. Just uncomment and edit the specific lines.
```ruby
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.