-
-
Save tdelam/2044363 to your computer and use it in GitHub Desktop.
Setting i18n translations in Refinery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In a controller | |
# This is not necessary when using the view code below | |
::I18n.locale = params[:locale] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- In a view with a dropdown --> | |
<ul class="dropdown-menu"> | |
<% Refinery::I18n.frontend_locales.each do |locale| %> | |
<li> | |
<%= link_to Refinery::I18n.built_in_locales[locale], {:locale => locale} %> | |
</li> | |
<% end %> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment