Ok the way it works in filters is it tries in this order:

    params[:locale] || session[:locale] || cookies[:locale] ||  request.env['HTTP_ACCEPT_LANGUAGE'] || I18n.default_locale

In our own filter with precedes the gettext_rails_i18n filter I set params[:locale] according to user setting. This overrides everything and works well, the issue is when user have something selected in the current session and he or she puts "Browser Locale" back there. Then I must delete the session[:locale] entry because otherwise user would need to log out and log in to get rid of the old setting.

That is reason why we have this. I just badly formatted it, now with my new good friend "try" I can make it much cleaner:

     session.delete(:locale) if params[:user][:locale].try(:empty?) and params[:id].to_i == User.current.id


Note I cannot use editing_self attribute because it is never set when the current user is admin. That is the reason why I need to compare IDs.