Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to change admin locale when using #35

Open
ghost opened this issue Feb 21, 2013 · 2 comments
Open

how to change admin locale when using #35

ghost opened this issue Feb 21, 2013 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 21, 2013

I saw this line in previous post :

filter :locale, :exclude => /^/admin/ if SpreeMultiLingual.use_locale_filter

I tried to add a locale selector in the admin header , but it doesn't change the locale
is it due to this filter exclude ? if yes , why it's not possible to change the admin locale ?

@sbounmy
Copy link
Collaborator

sbounmy commented Mar 30, 2013

admin use by default your application locale, in my case I have in app/controllers/admin/base_controller_decorator.rb

Spree::Admin::BaseController.class_eval do

  private

  def set_user_language
    I18n.locale = :en
  end

end

@sbounmy
Copy link
Collaborator

sbounmy commented Mar 30, 2013

I've not experienced having multi locale for admin, but you should try to remove

:exclude => /^\/admin/

Or 'exclude' should be configurable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant