How could/should I state colon (punctuation) in a YAML file?
问题 I am using Ruby on Rails 3.1.0 and I would like to know how to correctly state colon (punctuation) in a YAML file . I tried to support that by adding the following code in my config/locales/defaults/en.yml file en # ':' is the HTML code for ':' test_key_html: Test value: and in my view file I used t('test_key_html') but it doesn't work (in the front end content is displayed the "plain" Test value: text). Is it possible? If so how? 回答1: You should be able to double quote the value: test_key