module RouteTranslator::Controller

def set_locale_from_url

def set_locale_from_url
  locale_from_url = RouteTranslator.locale_from_request(request)
  if locale_from_url
    old_locale  = I18n.locale
    I18n.locale = locale_from_url
  end
  yield
ensure
  I18n.locale = old_locale if locale_from_url
end