Sha256: 13f3be1ed56350fd275b5cd8238e211e2cfd9508415aa3c6b16743b4f4e5ec7c

Contents?: true

Size: 565 Bytes

Versions: 4

Compression:

Stored size: 565 Bytes

Contents

module Carioca
    module Services
        class I18n

            def I18n.get(default_locale: , load_path:, locales_availables: )
                ::I18n::Backend::Simple.include(::I18n::Backend::Fallbacks)
                ::I18n.load_path << load_path
                ::I18n.default_locale = default_locale 
                 ::I18n.fallbacks = locales_availables
                return ::I18n
            end

            def I18n.get_system_locale
               return ::Locale.candidates.to_s.split('_').first.to_sym 
            end


        end
    end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
carioca-2.0.4 lib/carioca/services/i18n.rb
carioca-2.0.3 lib/carioca/services/i18n.rb
carioca-2.0.2 lib/carioca/services/i18n.rb
carioca-2.0.1 lib/carioca/services/i18n.rb