gregbell/active_admin — Issue #883: active_admin and i18n problem
Author: ktlabs
Created: 2011-12-26 18:04:12+00:00
State: open

It looks like active_admin fails to understand current locale of the application, having both default (english) and selected locales.

As per this discussion here:
http://stackoverflow.com/questions/7193043/activeadmin-internationalization

You need to add the following code into config/application.rb initializer for workaround:

> config.before_configuration do
> I18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}').to_s]
> I18n.locale = :nl
> I18n.default_locale = :nl
> config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}').to_s]
> config.i18n.locale = :nl
> # bypasses rails bug with i18n in production\
> I18n.reload!
> config.i18n.reload!
> end
> config.i18n.locale = :nl
> config.i18n.default_locale = :nl