Skip to content

Instantly share code, notes, and snippets.

@argami
Created August 1, 2012 18:47
Show Gist options
  • Save argami/3229722 to your computer and use it in GitHub Desktop.
Save argami/3229722 to your computer and use it in GitHub Desktop.
Locale on engine mount point (Spree)
Spree::BaseController.class_eval do
before_filter :set_user_language
def set_user_language
I18n.locale = params[:locale]
end
end
App::Application.routes.draw do
mount Spree::Core::Engine, :at => '/(:locale)/store'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment