Use I18n with HTML Tags and Symbols
suggest change# config/locales/en.yml
en:
stackoverflow:
header:
title_html: "Use <strong>I18n</strong> with Tags & Symbols"
Note the addition of extra _html after the name title.
And in Views,
# ERB
<h2><%= t(:title_html, scope: [:stackoverflow, :header]) %></h2>
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents