Created
February 14, 2011 23:57
-
-
Save davesag/826834 to your computer and use it in GitHub Desktop.
setting r18n 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
# r18n will grab locale info from the session first and if it's not in the session, the browser, if it can. | |
# add this to your code to allow for a manual override of the session | |
before do | |
session[:locale] = params[:locale] if params[:locale] #the r18n system will load it automatically | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment