aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides
diff options
context:
space:
mode:
Diffstat (limited to 'railties/doc/guides')
-rw-r--r--railties/doc/guides/source/i18n.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/doc/guides/source/i18n.txt b/railties/doc/guides/source/i18n.txt
index 035cf66808..90072d7087 100644
--- a/railties/doc/guides/source/i18n.txt
+++ b/railties/doc/guides/source/i18n.txt
@@ -403,6 +403,8 @@ image:images/i18n/demo_translated_pirate.png[rails i18n demo translated to pirat
NOTE: You need to restart the server when you add new locale files.
+You may use YAML (+.yml+) or plain Ruby (+.rb+) files for storing your translations in SimpleStore. YAML is the preffered option among Rails developers, has one big disadvantage, though. YAML is very sensitive to whitespace and special characters, so the application may not load your dictionary properly. Ruby files will crash your application during start-up time, so you may easily find what's wrong. (If you encounter any "weird issues" with YAML dictionaries, try putting the relevant portion of your dictionary into Ruby file.)
+
=== Adding Date/Time formats
OK! Now let's add a timestamp to the view, so we can demo the *date/time localization* feature as well. To localize the time format you pass the Time object to +I18n.l+ or (preferably) use Rails' +#l+ helper. You can pick a format by passing the +:format+ option -- by default the +:default+ format is used.