I'm trying to determine whether to show the Spanish or English button on my web application.

<% if I18n.locale == 'es' %>
  <a href="<%= set_english_path %>" class="thin">English</a>
<% else %>
  <a href="<%= set_spanish_path %>" class="thin">Spanish</a>
<% end %>

The if condition always fails and the Spanish button is always displayed.

RubyMine show this upon inspection (during debugging):

enter image description here

So why is the comparison failing?

Edit
Report