diff options
author | Steve Klabnik <steve@steveklabnik.com> | 2012-08-04 14:42:56 -0400 |
---|---|---|
committer | Steve Klabnik <steve@steveklabnik.com> | 2012-08-04 14:42:56 -0400 |
commit | 957e3d496683c8e7862a2acf8637def0b483bac9 (patch) | |
tree | 42cfb44d9db9bdc5c1ffc58b6030e24d1158a97b /railties | |
parent | 1a1230bffbec486eb85d9e6669486498fa20cb04 (diff) | |
download | rails-957e3d496683c8e7862a2acf8637def0b483bac9.tar.gz rails-957e3d496683c8e7862a2acf8637def0b483bac9.tar.bz2 rails-957e3d496683c8e7862a2acf8637def0b483bac9.zip |
Add extra documentation to the locale file.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/locales/en.yml | 23 |
1 files changed, 21 insertions, 2 deletions
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" |