title: How easily convert boolean to yes/no using Rails I18n
body: <p>I have an easy problem - I need to convert boolean (contract_pledge) to yes/no format in Russian language (Да/Нет). I thought I could easily find an answer because if you want to display checkboxes in show page in seem to be natural.
  I found these two posts:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/3664181/rails-or-ruby-yes-no-instead-of-true-false">Rails (or Ruby): Yes/No instead of True/False</a></li>
  <li><a href="https://stackoverflow.com/questions/622250/how-to-localize-a-rails-plugin">How to localize a Rails plugin?</a></li>
  </ul>
  
  <p>I tried to combine them but I failed. Now I have Yes/No only in English.
  Thats what I have in my view /views/lots/show.html.erb</p>
  
  <pre><code>&lt;%= form_for([@lot.tender,@lot]) do |f| %&gt;
  &lt;table&gt;
  ...
  &lt;tr&gt;
  &lt;td class="right"&gt;&lt;b&gt;&lt;%= f.label :contract_pledge %&gt;&lt;/b&gt;&lt;/td&gt;
  &lt;td&gt;&lt;%=t @lot.contract_pledge.yesno %&gt;&lt;/td&gt;
  &lt;/tr&gt;
  ...
  &lt;/table&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>That's the file /config/initializers/boolean_path.rb I created:</p>
  
  <pre><code>class FalseClass
    def yesno
      "No"
    end
  end
  
  class TrueClass
    def yesno
      "Yes"
     end
  end
  </code></pre>
  
  <p>That's my /config/locales/ru.yml</p>
  
  <pre><code>ru:
      yesno:
        Yes: "Да"
        No: "Нет"
  </code></pre>
  
  <p>Of course I can solve the problem inserting Russian language in Lot view, but I want to do it in rails way. I will appreciate any help, and I think that this question will be useful for other rails young programmers.</p>