Skip to content

Instantly share code, notes, and snippets.

@davesag
Created February 14, 2011 23:57
Show Gist options
  • Save davesag/826834 to your computer and use it in GitHub Desktop.
Save davesag/826834 to your computer and use it in GitHub Desktop.
setting r18n locale
# 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