Module: SocialStream::Controllers::I18nIntegration
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/social_stream/controllers/i18n_integration.rb
Overview
Common methods added to ApplicationController
Instance Method Summary collapse
-
#set_locale ⇒ Object
Set locale as per params, user preference or default.
Instance Method Details
#set_locale ⇒ Object
Set locale as per params, user preference or default
12 13 14 |
# File 'lib/social_stream/controllers/i18n_integration.rb', line 12 def set_locale I18n.locale = params[:locale] || user_preferred_locale || session[:locale] || extract_locale_from_accept_language_header || I18n.default_locale end |