Class: ActionController::Base

### Home Classes Methods

### In Files

- lib/gettext_i18n_rails/action_controller.rb

### Parent

Object

### Methods

- #set_gettext_locale

### Class/Module Index

Quicksearch

- GettextI18nRails
- GettextI18nRails::Backend
- GettextI18nRails::BaseParser
- GettextI18nRails::GettextHooks
- GettextI18nRails::HamlParser
- GettextI18nRails::HtmlSafeTranslations
- GettextI18nRails::ModelAttributesFinder
- GettextI18nRails::Railtie
- GettextI18nRails::SlimParser
- RubyGettextExtractor
- RubyGettextExtractor::Extractor18
- RubyGettextExtractor::Extractor19
- RubyGettextExtractor::ExtractorMethods
- ActionController
- ActionController::Base
- ActiveModel
- ActiveModel::Translation
- ActiveRecord
- ActiveRecord::Base
- I18n
- I18n::Config
- Object
- String

No matching classes.

# ActionController::Base

### Public Instance Methods

set_gettext_locale() click to toggle source

    # File lib/gettext_i18n_rails/action_controller.rb, line 2
    def set_gettext_locale
      requested_locale = params[:locale] || session[:locale] || cookies[:locale] ||  request.env['HTTP_ACCEPT_LANGUAGE'] || I18n.default_locale
      locale = FastGettext.set_locale(requested_locale)
      session[:locale] = locale
      I18n.locale = locale # some weird overwriting in action-controller makes this necessary ... see I18nProxy
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.