lib/translations_ennder/rails.rb in translations_ennder-1.1.0 vs lib/translations_ennder/rails.rb in translations_ennder-1.1.1

- old
+ new

@@ -55,12 +55,12 @@ #Vient du paramètre de requête I18n.locale = _param_locale elsif session[:locale].blank? and (! request.env['HTTP_ACCEPT_LANGUAGE'].blank?) #Vient des entêtes de la requête _http_lang_tab = request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/) - if (! _http_lang_tab.empty?) and (! _http_lang.first.blank? ) - if _http_lang.first.match /^(en|fr)$/ - I18n.locale = _http_lang.first + if (! _http_lang_tab.empty?) and (! _http_lang_tab.first.blank? ) + if _http_lang_tab.first.match /^(en|fr)$/ + I18n.locale = _http_lang_tab.first else set_locale_session_or_fr end else set_locale_session_or_fr