diff options
author | Anil Wadghule <anildigital@gmail.com> | 2010-04-13 00:56:34 +0530 |
---|---|---|
committer | Anil Wadghule <anildigital@gmail.com> | 2010-04-13 00:56:34 +0530 |
commit | 3f0097c7157e4a328f87cdf80ab6330c39b6d90f (patch) | |
tree | 6ee01862210338b4c42dc327cb6f6e3fd611a89d /railties | |
parent | 84e46437fa50782dd38b96b8df00ca8b017c892e (diff) | |
download | rails-3f0097c7157e4a328f87cdf80ab6330c39b6d90f.tar.gz rails-3f0097c7157e4a328f87cdf80ab6330c39b6d90f.tar.bz2 rails-3f0097c7157e4a328f87cdf80ab6330c39b6d90f.zip |
Updated guide to use 'Rails.root.join' to construct path
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/i18n.textile | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/guides/source/i18n.textile b/railties/guides/source/i18n.textile index 9e882bc0a1..cfaa573fa0 100644 --- a/railties/guides/source/i18n.textile +++ b/railties/guides/source/i18n.textile @@ -103,7 +103,7 @@ The default +environment.rb+ files has instructions on how to add locales from a # The internationalization framework can be changed # to have another default locale (standard is :en) or more load paths. # All files from config/locales/*.rb,yml are added automatically. -# config.i18n.load_path << Dir[File.join(Rails.root, 'my', 'locales', '*.{rb,yml}')] +# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')] # config.i18n.default_locale = :de </ruby> @@ -117,8 +117,7 @@ To tell the I18n library where it can find your custom translation files you can # in config/initializers/locale.rb # tell the I18n library where to find your translations -I18n.load_path << Dir[ File.join(Rails.root, 'lib', 'locale', - '*.{rb,yml}') ] +I18n.load_path << Dir[Rails.root.join('lib', 'locale', '*.{rb,yml}')] # set default locale to something other than :en I18n.default_locale = :pt @@ -423,7 +422,8 @@ NOTE: The default locale loading mechanism in Rails does not load locale files i <ruby> # config/environment.rb - config.i18n.load_path += Dir[File.join(Rails.root, 'config', 'locales', '**', '*.{rb,yml}')] + config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')] + </ruby> Do check the "Rails i18n Wiki":http://rails-i18n.org/wiki for list of tools available for managing translations. |