From 7531aa76417a5db337287c31c1b97ad53615c8e6 Mon Sep 17 00:00:00 2001 From: Alexey Vakhov Date: Thu, 15 Sep 2011 10:41:55 +0400 Subject: [PATCH] update guides, use html safe translations in i18n --- .../assets/images/i18n/demo_html_safe.png | Bin 0 -> 11946 bytes railties/guides/source/i18n.textile | 22 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 railties/guides/assets/images/i18n/demo_html_safe.png diff --git a/railties/guides/assets/images/i18n/demo_html_safe.png b/railties/guides/assets/images/i18n/demo_html_safe.png new file mode 100644 index 0000000000000000000000000000000000000000..f881f60dac6c83fc25492c48f4182d220ca20a23 GIT binary patch literal 11946 zcmYj%1z20b(sqF2MT={pIK|y5R-kBccXxLyQXGoAJH_2evEpt;LUDHp&L8N#_y6)d z$?lmsJ7;!gcFydZ4O5W&jDkdf1ONa~q$I_@0sv6qkbWNm9OPFTzJVChKskN=ECQ$; zBie&pz!`q|ECy*IpIgy3KS+aUFR9@K03g46`9cBGGVmZocxNeDarh-fG&pj`tR@&v z0N_19O6-%e`=6r~H+QVryY90SYml|42xc6*2to%f^f%p4SXhc!id8zFKB_k_h>Jn> z9bXl{*H%>gxPYBVUP6PTjP*$&R(IMzsD8zG>G1ZkrZm=C5`cZ-n`K7oYGyVzl7V<} z%wuM%ixLX|Q}_)!tUAJ!Wjn%|ozFA^i!1_J?~i;D86~o!*$1`Rn?tA!VU{%(DA%06 zg&Lz6LRRD7-SzeLPp)kOvimv+WNF#w=jS?YZYNLIb>o8f=c#5{8pwx}{)`*_Q3v-Y ze$V$f>7%Y00~=)M2$D94WMXW_%y`wB70oNh9Clrg*Y$hT#Z}BuijVhT(h`e54vfiP zETte~YlPqXgH8sFS+BT{>Zj$h1%2*Fsk#YBNrk!(uB1^A$$|io4kjVt5~=&(8$AD+ zkk<5suQ%R;*E?G^o=+m@a}_;GU!nauSmO#9b+~;O7JI2E4LH*$>q7>rt&&=7pQsOY zz=T=r;jH<2lDkuhj6GvEUsJuVw`z9NZ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c!XX}D4_p3c=zsQR#~;BFL73Ff`RC|6$ybr^OOPGOmR8GOIY?9hKdpCwSIh6L zMP6kpFVvbKpL9J7LLm0C42tA|mrTJeNkK&={Q`d~+DsS8Hhk+1FoJ-Vke$NlLI?`s z%~~LuC2Sah5!Mie$_tTCawMHA#;UR(LpVWa6>^BfXn zXs|B_fz2Q9u3X^4(y}Qbvk+rz@VGD)e7f0){j~lF232L~e9c876LUhwbb$?S6;y*m zLTQ$zy{cEvhS&tgBF!}&ZW#&Bs{Jj8E{Bj6ytmq-jmkxbYj*_iQ-zd+`*>R1mWhXk zZj#;DFzJmh@#(iU*e{9MFdVv`Q78055EA_5GyJEgX{tQ2G@_SN=2GHvVwEEL-~Jyt CH9B(u literal 0 HcmV?d00001 diff --git a/railties/guides/source/i18n.textile b/railties/guides/source/i18n.textile index 4b6b08bcec..76cd14d479 100644 --- a/railties/guides/source/i18n.textile +++ b/railties/guides/source/i18n.textile @@ -448,6 +448,7 @@ Covered are features like these: * looking up translations * interpolating data into translations * pluralizing translations +* using safe HTML translations * localizing dates, numbers, currency, etc. h4. Looking up Translations @@ -599,6 +600,27 @@ The +I18n.locale+ defaults to +I18n.default_locale+ which defaults to :+en+. The I18n.default_locale = :de +h4. Using Safe HTML Translations + +Keys with a '_html' suffix and keys named 'html' are marked as HTML safe. Use them in views without escaping. + + +# config/locales/en.yml +en: + welcome: welcome! + hello_html: hello! + title: + html: title! + +# app/views/home/index.html.erb +
<%= t('welcome') %>
+
<%= raw t('welcome') %>
+
<%= t('hello_html') %>
+
<%= t('title.html') %>
+
+ +!images/i18n/demo_html_safe.png(i18n demo html safe)! + h3. How to Store your Custom Translations The Simple backend shipped with Active Support allows you to store translations in both plain Ruby and YAML format. [2]