Reputation: 4792
I am using Ruby on Rails 3.1.0 and I would like to know how to correctly state internationalization keys/values in YAML files (I have a couple of questions/doubts...). That is, I have a locale file containing the following code:
en:
# Note the 'style' HTML property and the ':' at the end
test_key_html: <span style='color: #4682B4;'>Test text</span>:
Upvotes: 0
Views: 396
Reputation: 28574
Those translation files aren't meant to have HTML. I would avoid having the entire HTML string in there, instead just have the string "Test text" and move the html portion back into your template or helper.
Upvotes: 1