Sha256: a46d4eddb0c38639b5bab783ed7b1a75ca8b300ec69da555bf6a7084d5abf079

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

module Releaf
  module Globalize3
    module Fallbacks
      def self.set
        i18n_fallbacks = {}

        I18n.default_locale ||= 'en'
        I18n.locale ||= 'en'

        valid_locales = Settings.i18n_locales || []

        (valid_locales + [I18n.default_locale, I18n.locale]).uniq.each do |locale|
          i18n_fallbacks[locale] = valid_locales - [locale]
        end
        Globalize.fallbacks = i18n_fallbacks
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
releaf-0.1.2 lib/releaf/globalize3/fallbacks.rb