From 957e3d496683c8e7862a2acf8637def0b483bac9 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Sat, 4 Aug 2012 14:42:56 -0400 Subject: Add extra documentation to the locale file. --- .../rails/app/templates/config/locales/en.yml | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/generators/rails/app/templates/config/locales/en.yml b/railties/lib/rails/generators/rails/app/templates/config/locales/en.yml index 179c14ca52..e0a784c8fd 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/locales/en.yml +++ b/railties/lib/rails/generators/rails/app/templates/config/locales/en.yml @@ -1,5 +1,24 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. +# Files in the config/locales directory are used for internationalization. +# This file is for English, and is therefore named 'en.yml'. Add more files in +# this directory for other locales. Rails will automatically load every +# locale file in this directory. +# +# To use this location information, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more, read the internationalization Rails Guide: +# http://guides.rubyonrails.org/i18n.html en: hello: "Hello world" -- cgit v1.2.3 From 62499bcb9d8aa65636f5cd3ace2a818ffd4e2f8a Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Thu, 16 Aug 2012 00:05:47 +0530 Subject: copy edits [ci skip] --- .../generators/rails/app/templates/config/locales/en.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/generators/rails/app/templates/config/locales/en.yml b/railties/lib/rails/generators/rails/app/templates/config/locales/en.yml index e0a784c8fd..0653957166 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/locales/en.yml +++ b/railties/lib/rails/generators/rails/app/templates/config/locales/en.yml @@ -1,9 +1,8 @@ -# Files in the config/locales directory are used for internationalization. -# This file is for English, and is therefore named 'en.yml'. Add more files in -# this directory for other locales. Rails will automatically load every -# locale file in this directory. +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. # -# To use this location information, use `I18n.t`: +# To use the locales, use `I18n.t`: # # I18n.t 'hello' # @@ -17,8 +16,8 @@ # # This would use the information in config/locales/es.yml. # -# To learn more, read the internationalization Rails Guide: -# http://guides.rubyonrails.org/i18n.html +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. en: hello: "Hello world" -- cgit v1.2.3