aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/i18n.textile
diff options
context:
space:
mode:
authorJan Vlnas <git@jan.vlnas.cz>2011-09-18 16:41:21 +0300
committerJan Vlnas <git@jan.vlnas.cz>2011-09-18 16:41:21 +0300
commitea29968bcfa455d9bef8c41436b6bea669dfc06d (patch)
treeccca887e214d7f172f41551c7ea627bb5bba0af7 /railties/guides/source/i18n.textile
parent908f2616d5c2b9e26eb180859f7df529a7a59f08 (diff)
downloadrails-ea29968bcfa455d9bef8c41436b6bea669dfc06d.tar.gz
rails-ea29968bcfa455d9bef8c41436b6bea669dfc06d.tar.bz2
rails-ea29968bcfa455d9bef8c41436b6bea669dfc06d.zip
Locale code for Czech is ":cs"
Diffstat (limited to 'railties/guides/source/i18n.textile')
-rw-r--r--railties/guides/source/i18n.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/i18n.textile b/railties/guides/source/i18n.textile
index a35cd6c506..14ce6a19d5 100644
--- a/railties/guides/source/i18n.textile
+++ b/railties/guides/source/i18n.textile
@@ -91,7 +91,7 @@ This means, that in the +:en+ locale, the key _hello_ will map to the _Hello wor
The I18n library will use *English* as a *default locale*, i.e. if you don't set a different locale, +:en+ will be used for looking up translations.
-NOTE: The i18n library takes a *pragmatic approach* to locale keys (after "some discussion":http://groups.google.com/group/rails-i18n/browse_thread/thread/14dede2c7dbe9470/80eec34395f64f3c?hl=en), including only the _locale_ ("language") part, like +:en+, +:pl+, not the _region_ part, like +:en-US+ or +:en-UK+, which are traditionally used for separating "languages" and "regional setting" or "dialects". Many international applications use only the "language" element of a locale such as +:cz+, +:th+ or +:es+ (for Czech, Thai and Spanish). However, there are also regional differences within different language groups that may be important. For instance, in the +:en-US+ locale you would have $ as a currency symbol, while in +:en-UK+, you would have £. Nothing stops you from separating regional and other settings in this way: you just have to provide full "English - United Kingdom" locale in a +:en-UK+ dictionary. Various "Rails I18n plugins":http://rails-i18n.org/wiki such as "Globalize2":https://github.com/joshmh/globalize2/tree/master may help you implement it.
+NOTE: The i18n library takes a *pragmatic approach* to locale keys (after "some discussion":http://groups.google.com/group/rails-i18n/browse_thread/thread/14dede2c7dbe9470/80eec34395f64f3c?hl=en), including only the _locale_ ("language") part, like +:en+, +:pl+, not the _region_ part, like +:en-US+ or +:en-UK+, which are traditionally used for separating "languages" and "regional setting" or "dialects". Many international applications use only the "language" element of a locale such as +:cs+, +:th+ or +:es+ (for Czech, Thai and Spanish). However, there are also regional differences within different language groups that may be important. For instance, in the +:en-US+ locale you would have $ as a currency symbol, while in +:en-UK+, you would have £. Nothing stops you from separating regional and other settings in this way: you just have to provide full "English - United Kingdom" locale in a +:en-UK+ dictionary. Various "Rails I18n plugins":http://rails-i18n.org/wiki such as "Globalize2":https://github.com/joshmh/globalize2/tree/master may help you implement it.
The *translations load path* (+I18n.load_path+) is just a Ruby Array of paths to your translation files that will be loaded automatically and available in your application. You can pick whatever directory and translation file naming scheme makes sense for you.