aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/i18n.md
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2012-09-02 14:52:12 -0400
committerPrem Sichanugrist <s@sikac.hu>2012-09-17 15:54:23 -0400
commit2e89ac34cf25d1045dcef50d1a03dd84fb37d739 (patch)
tree51344096ba654d353eae8dc3503d874b3d9f81f7 /guides/source/i18n.md
parent2c38567646791f223b4e48550fba0e0386a05d96 (diff)
downloadrails-2e89ac34cf25d1045dcef50d1a03dd84fb37d739.tar.gz
rails-2e89ac34cf25d1045dcef50d1a03dd84fb37d739.tar.bz2
rails-2e89ac34cf25d1045dcef50d1a03dd84fb37d739.zip
Convert image tags to Markdown syntax
Diffstat (limited to 'guides/source/i18n.md')
-rw-r--r--guides/source/i18n.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/guides/source/i18n.md b/guides/source/i18n.md
index 91d12fdc85..b15d5d2089 100644
--- a/guides/source/i18n.md
+++ b/guides/source/i18n.md
@@ -318,7 +318,7 @@ end
<p><%= flash[:notice] %></p>
```
-!images/i18n/demo_untranslated.png(rails i18n demo untranslated)!
+![rails i18n demo untranslated](images/i18n/demo_untranslated.png)
### Adding Translations
@@ -339,7 +339,7 @@ end
When you now render this view, it will show an error message which tells you that the translations for the keys `:hello_world` and `:hello_flash` are missing.
-!images/i18n/demo_translation_missing.png(rails i18n demo translation missing)!
+![rails i18n demo translation missing](images/i18n/demo_translation_missing.png)
NOTE: Rails adds a `t` (`translate`) helper method to your views so that you do not need to spell out `I18n.t` all the time. Additionally this helper will catch missing translations and wrap the resulting error message into a `&lt;span class="translation_missing"&gt;`.
@@ -359,11 +359,11 @@ pirate:
There you go. Because you haven't changed the default_locale, I18n will use English. Your application now shows:
-!images/i18n/demo_translated_en.png(rails i18n demo translated to English)!
+![rails i18n demo translated to English](images/i18n/demo_translated_en.png)
And when you change the URL to pass the pirate locale (`http://localhost:3000?locale=pirate`), you'll get:
-!images/i18n/demo_translated_pirate.png(rails i18n demo translated to pirate)!
+![rails i18n demo translated to pirate](images/i18n/demo_translated_pirate.png)
NOTE: You need to restart the server when you add new locale files.
@@ -405,7 +405,7 @@ pirate:
So that would give you:
-!images/i18n/demo_localized_pirate.png(rails i18n demo localized time to pirate)!
+![rails i18n demo localized time to pirate](images/i18n/demo_localized_pirate.png)
TIP: Right now you might need to add some more date/time formats in order to make the I18n backend work as expected (at least for the 'pirate' locale). Of course, there's a great chance that somebody already did all the work by *translating Rails' defaults for your locale*. See the [rails-i18n repository at Github](https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale) for an archive of various locale files. When you put such file(s) in `config/locales/` directory, they will automatically be ready for use.
@@ -644,7 +644,7 @@ en:
<div><%= t('title.html') %></div>
```
-!images/i18n/demo_html_safe.png(i18n demo html safe)!
+![i18n demo html safe](images/i18n/demo_html_safe.png)
How to Store your Custom Translations
-------------------------------------