Sha256: e66481c4f7b11ab0a8f916052db89e3815cec43a3ee363d51a762fa43d0de3f6

Contents?: true

Size: 418 Bytes

Versions: 9

Compression:

Stored size: 418 Bytes

Contents

module I18n
  module_function

  def locale=(new_locale)
    FastGettext.locale = new_locale
  end

  def locale
    FastGettext.locale.to_sym
  end

  # since Rails 2.3.8 a config object is used instead of just .locale
  if defined? Config
    class Config
      def locale
        FastGettext.locale.to_sym
      end

       def locale=(new_locale)
        FastGettext.locale=(new_locale)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gettext_i18n_rails-0.2.8 lib/gettext_i18n_rails/i18n_hacks.rb
gettext_i18n_rails-0.2.7 lib/gettext_i18n_rails/i18n_hacks.rb
gettext_i18n_rails-0.2.6 lib/gettext_i18n_rails/i18n_hacks.rb
gettext_i18n_rails-0.2.5 lib/gettext_i18n_rails/i18n_hacks.rb
gettext_i18n_rails-0.2.4 lib/gettext_i18n_rails/i18n_hacks.rb
gettext_i18n_rails-0.2.3 lib/gettext_i18n_rails/i18n_hacks.rb
gettext_i18n_rails-0.2.2 lib/gettext_i18n_rails/i18n_hacks.rb
gettext_i18n_rails-0.2.1 lib/gettext_i18n_rails/i18n_hacks.rb
gettext_i18n_rails-0.2.0 lib/gettext_i18n_rails/i18n_hacks.rb