# Very weird "error"

**URL:** <https://www.ruby-forum.com/t/very-weird-error/183760>\
**Category:** Rails I18n\
**Created:** [February 19, 2010, 4:47pm UTC](https://www.ruby-forum.com/t/very-weird-error/183760 "2010-02-19T16:47:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![taranaki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e495f1/32.png) [@taranaki](https://www.ruby-forum.com/u/taranaki)\
**Post date:** [February 19, 2010, 4:47pm UTC](https://www.ruby-forum.com/t/very-weird-error/183760/1 "2010-02-19T16:47:34Z")

</div>

Hello everyone

I am working on a project and I am quite new to Rails, now I encountered  
something very strange in connection with the I18n.

I use the following lines:  
\<%= submit\_tag t(:yes\_label), :name =\> ‘yes’ %\>  
\<%= submit\_tag t(:no\_label), :name =\> ‘cancel’ %\>  
:yes\_label and :no\_label are defined in a de.yml and in an en.yml file.  
There are many other translations and all of them work.

If I load the page in German everything is correct and the correct  
translation is used…

If I load it in English the translation from the yml file is NOT used…  
The button says true and false (I have no idea where this comes from,  
those words are nowhere to be seen in the en.yml file) instead of Yes  
and No.

Does anyone have an idea what the problem could be?

Also when using this code:  
\<%= submit\_tag t(:yes\_label) %\>  
\<%= link\_to t(:no\_label), companies\_path %\>  
Instead of giving a button with Yes and a link with No I get something  
really curious… Theres a true button and part of a url…  
/companies?locale=en  
Whereas in the German version I have a Ja button and a Nein link…

---

<div class="post-metadata">

**Author:** ![taranaki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e495f1/32.png) [@taranaki](https://www.ruby-forum.com/u/taranaki)\
**Post date:** [February 19, 2010, 5:04pm UTC](https://www.ruby-forum.com/t/very-weird-error/183760/2 "2010-02-19T17:04:46Z")

</div>

I figured it out…

When I put  
no\_label: “No”  
instead of no\_label: No

it worked…

Same with Yes…

---

<div class="post-metadata">

**Author:** ![taranaki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e495f1/32.png) [@taranaki](https://www.ruby-forum.com/u/taranaki)\
**Post date:** [February 19, 2010, 5:15pm UTC](https://www.ruby-forum.com/t/very-weird-error/183760/3 "2010-02-19T17:15:16Z")

</div>

Yes/No, and On/Off are aliases for True/False in YAML, so they need to  
be escaped to be used as strings
