Rails i18n yes/no translation
Quick tip
keys in yaml are actually yaml content (has reserved words). So, translating things like yes, no, y, n, on or off will silently fail (evaluate to boolean in the key)
So instead of
yes: "si"
do
"yes": "si"
to make sure it's evaluated as a string instead of a boolean.
Full reference card for checking your keys can be found in: http://yaml.org/refcard.html
Written by Franco
Related protips
1 Response
Thanks for the protip... Such a hassle.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#I18n
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#