Skip to content

Instantly share code, notes, and snippets.

@nicinabox
Created March 6, 2012 17:53
Show Gist options
  • Save nicinabox/1987745 to your computer and use it in GitHub Desktop.
Save nicinabox/1987745 to your computer and use it in GitHub Desktop.
Setting i18n translations in Refinery
# In a controller
# This is not necessary when using the view code below
::I18n.locale = params[:locale]
<!-- In a view with a dropdown -->
<ul class="dropdown-menu">
<% Refinery::I18n.frontend_locales.each do |frontend_locale| %>
<li>
<%= link_to Refinery::I18n.locales[frontend_locale], {:locale => frontend_locale} %>
</li>
<% end %>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment