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