2013-10-26 72 views
2

我需要設置2個獨立的靜態區域設置,因此前端始終是俄語的後端和英語後端。
添加這/config/initializers/spree.rb/app/controllers/application_controller.rb沒有影響:Spree Commerce中前端和後端的不同區域設置

Spree::Frontend::Config[:locale] = :en 
Spree::Backend::Config[:locale] = :ru 

有一個PR,其中比格瑞恩在前端分裂的核心,當解決了這個問題,並且後端https://github.com/spree/spree/commit/78b032dcfc02d362af780d6154ff300fbc0e95b0

我不能找到代碼的位置或者我的代碼不正確。

回答

2

你可以嘗試以下方法:

# app/controllers/spree/admin/base_controller_decorator.rb 
Spree::Admin::BaseController.class_eval do 
    before_filter do 
    I18n.locale = :ru 
    end 
end