Sha256: 76c6d92d2ec47c726edf2a6a11831d6ea7b0e28438efbc788735ccc1b3c145d1

Contents?: true

Size: 383 Bytes

Versions: 7

Compression:

Stored size: 383 Bytes

Contents

module RailsLocaleDetection
  module LocaleAccessors
    def alternate_locales
      available_locales - [current_locale]
    end

    def available_locales
      I18n.available_locales
    end

    def current_locale
      I18n.locale
    end
    
    def current_locale=(locale)
      I18n.locale = locale
    end

    def default_locale
      I18n.default_locale
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rails_locale_detection-2.3.0 lib/rails_locale_detection/locale_accessors.rb
rails_locale_detection-2.2.0 lib/rails_locale_detection/locale_accessors.rb
rails_locale_detection-2.1.0 lib/rails_locale_detection/locale_accessors.rb
rails_locale_detection-2.0.0 lib/rails_locale_detection/locale_accessors.rb
rails_locale_detection-2.0.0.pre4 lib/rails_locale_detection/locale_accessors.rb
rails_locale_detection-2.0.0.pre3 lib/rails_locale_detection/locale_accessors.rb
rails_locale_detection-2.0.0.pre2 lib/rails_locale_detection/locale_accessors.rb