aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-10-22 13:38:29 -0400
committerGitHub <noreply@github.com>2018-10-22 13:38:29 -0400
commit64385bdf30b3bd7a44e2f456fca6a33ae2bb451c (patch)
treeadb181c9c7ab475cfe805f633c3668b523ef28e5 /guides
parentdc6761592009e9146552fc9d6299bf58a34e187a (diff)
parent5c62bd53f6589be67bd0037acbeaa9b7db7a67a3 (diff)
downloadrails-64385bdf30b3bd7a44e2f456fca6a33ae2bb451c.tar.gz
rails-64385bdf30b3bd7a44e2f456fca6a33ae2bb451c.tar.bz2
rails-64385bdf30b3bd7a44e2f456fca6a33ae2bb451c.zip
Merge pull request #34241 from gmcgibbon/clarify_i18n_load_paths_gotcha
Clarify i18n load paths gotcha
Diffstat (limited to 'guides')
-rw-r--r--guides/source/i18n.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/guides/source/i18n.md b/guides/source/i18n.md
index 78e5f27448..eba71eec60 100644
--- a/guides/source/i18n.md
+++ b/guides/source/i18n.md
@@ -116,7 +116,7 @@ NOTE: The backend lazy-loads these translations when a translation is looked up
You can change the default locale as well as configure the translations load paths in `config/application.rb` as follows:
```ruby
- config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
config.i18n.default_locale = :de
```
@@ -135,6 +135,8 @@ I18n.available_locales = [:en, :pt]
I18n.default_locale = :pt
```
+Note that appending directly to `I18n.load_paths` instead of to the application's configured i18n will _not_ override translations from external gems.
+
### Managing the Locale across Requests
The default locale is used for all translations unless `I18n.locale` is explicitly set.