Module: I18n

### Home Classes Methods

### In Files

- lib/gettext_i18n_rails/i18n_hacks.rb

### Namespace

- CLASS I18n::Config

### Methods

- ::with_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.

# I18n

### Public Class Methods

with_locale(tmp_locale = nil) click to toggle source

backport I18n.with_locale if it does not exist Executes block with given I18n.locale set.

    # File lib/gettext_i18n_rails/i18n_hacks.rb, line 16
    def self.with_locale(tmp_locale = nil)
      if tmp_locale
        current_locale = self.locale
        self.locale = tmp_locale
      end
      yield
    ensure
      self.locale = current_locale if tmp_locale
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.