use I18n.locale = :ar if session[:locale].nil?

same goes for english