jipiboily / spree_multi_lingual

Spree multi-lingual is a plugin to make multi locale store with Spree possible
BSD 3-Clause "New" or "Revised" License
49 stars 56 forks source link

how to change admin locale when using #35

Open ghost opened 11 years ago

ghost commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

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

:exclude => /^\/admin/

Or 'exclude' should be configurable