From 2c01714d2d27c80008f479611e7fcf66eec86987 Mon Sep 17 00:00:00 2001 From: Trevor Wistaff Date: Tue, 6 Jun 2017 14:48:18 +1000 Subject: [ci skip] Remove explicit to_s for consistency with other example --- guides/source/i18n.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/source/i18n.md b/guides/source/i18n.md index 78e5f27448..b1bb13e0f8 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 ``` -- cgit v1.2.3 From 5c62bd53f6589be67bd0037acbeaa9b7db7a67a3 Mon Sep 17 00:00:00 2001 From: Gannon McGibbon Date: Tue, 16 Oct 2018 17:40:29 -0400 Subject: [ci skip] Clarify load_paths behaviour Clarify `I18n.load_paths` vs `Rails.application.config.i18n.load_paths` behaviour. [Gannon McGibbon + Alberto Almagro Sotelo] --- guides/source/i18n.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guides/source/i18n.md b/guides/source/i18n.md index b1bb13e0f8..eba71eec60 100644 --- a/guides/source/i18n.md +++ b/guides/source/i18n.md @@ -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. -- cgit v1.2.3