class AbstractController::I18nProxy

:nodoc:
TODO Add some deprecation warnings to remove I18n.locale from controllers
it will trigger the lookup_context and consequently expire the cache.
This is a class to fix I18n global state. Whenever you provide I18n.locale during a request,

def initialize(i18n_config, lookup_context)

def initialize(i18n_config, lookup_context)
  @i18n_config, @lookup_context = i18n_config, lookup_context
end

def locale

def locale
  @i18n_config.locale
end

def locale=(value)

def locale=(value)
  @lookup_context.locale = value
end