我的问题正是07000中描述的问题.只有区别:我正在使用Rails 3(3.0.4正好),它使用%{…}语法而不是旧的{{…}}.
问题:Rails 3转义%{…}中的所有标签,所以我无法插入,在那里的链接.
有什么办法克服这个吗?
thx为任何帮助
我终于弄清楚了,你必须使用_html作为任何yaml键的后缀,你不希望html转义:
@H_
403_12@paragraph_html: "This is some text with a %{link}"
paragraph_linktext: "really cool link"
接着
@H_
403_12@link = link_to t( paragraph_linktext ),"http://www.example.com"
<%= t( paragraph_html,:link => link ) %>
瞧,那里你有你的i18nized的链接.