diff options
Diffstat (limited to 'guides/source/i18n.md')
-rw-r--r-- | guides/source/i18n.md | 12 |
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 `<span class="translation_missing">`. @@ -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 ------------------------------------- |