aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/i18n.md
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2016-06-03 14:00:47 +0000
committerVijay Dev <vijaydev.cse@gmail.com>2016-06-03 14:00:47 +0000
commit4e85538dddf47877cacc65cea6c050e349af0405 (patch)
tree302517b50aa4eb1fbccf520b752dffda68807c1a /guides/source/i18n.md
parent082a5158251c6578714132e5c4f71bd39f462d71 (diff)
parentcf2158cbbf12a3a00c780ef5136f11b77c566713 (diff)
downloadrails-4e85538dddf47877cacc65cea6c050e349af0405.tar.gz
rails-4e85538dddf47877cacc65cea6c050e349af0405.tar.bz2
rails-4e85538dddf47877cacc65cea6c050e349af0405.zip
Merge branch 'master' of github.com:rails/docrails
Conflicts: guides/source/action_cable_overview.md
Diffstat (limited to 'guides/source/i18n.md')
-rw-r--r--guides/source/i18n.md7
1 files changed, 3 insertions, 4 deletions
diff --git a/guides/source/i18n.md b/guides/source/i18n.md
index 0edfa072f8..f3802a142f 100644
--- a/guides/source/i18n.md
+++ b/guides/source/i18n.md
@@ -109,12 +109,11 @@ The **translations load path** (`I18n.load_path`) is an array of paths to files
NOTE: The backend lazy-loads these translations when a translation is looked up for the first time. This backend can be swapped with something else even after translations have already been announced.
-The default `config/application.rb` file has instructions on how to add locales from another directory and how to set a different default locale.
+You can change the default locale as well as configure the translations load paths in `config/application.rb` as follows:
```ruby
-# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
-# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
-# config.i18n.default_locale = :de
+ config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ config.i18n.default_locale = :de
```
The load path must be specified before any translations are looked up. To change the default locale from an initializer instead of `config/application.rb`: