I've installed rails_admin gem on my localized site (3 languages) and i need administration zone (/admin) to be always in English. Any idea how to do that? Maybe I can force locale for route?
Thank you.
I haven't used rails_admin but a quick scan of it's repo would indicate it's using whatever locale is set in you app. I'm guessing you set that in a before_filter in your application.rb via one of the methods outlined in the Rails i18n guide. You'll have to make that before_filter a bit cleverer. Perhaps something like:
if self.kind_of? RailsAdmin::ApplicationController
I18n.locale = :en
else
# Your current code
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With