Sha256: 43b8ad4ce2b0e3dfe4630285746f8e6141981144eebede1bc03d2b393b05635d

Contents?: true

Size: 722 Bytes

Versions: 153

Compression:

Stored size: 722 Bytes

Contents

require 'rubygems'
require 'bundler/setup'

require 'facets/string/interpolate'
require 'r18n-core'

module RubyApp
  require 'ruby_app/mixins'

  class Language < R18n::I18n
    extend RubyApp::Mixins::ConfigurationMixin
    extend RubyApp::Mixins::DelegateMixin

    def self.get
      return R18n.get
    end

    def self.load!(language = nil)
      paths = RubyApp::Language.configuration.paths.collect { |path| String.interpolate { path } }
      R18n.thread_set(RubyApp::Language.new(language || RubyApp::Language.configuration.default, paths))
    end

    def self.unload!
      R18n.thread_set(nil)
    end

    private

      def initialize(language, paths)
        super(language, paths)
      end

  end

end

Version data entries

153 entries across 153 versions & 1 rubygems

Version Path
RubyApp-0.6.12 lib/ruby_app/language.rb
RubyApp-0.6.11 lib/ruby_app/language.rb
RubyApp-0.6.10 lib/ruby_app/language.rb
RubyApp-0.6.8 lib/ruby_app/language.rb
RubyApp-0.6.7 lib/ruby_app/language.rb
RubyApp-0.6.2 lib/ruby_app/language.rb
RubyApp-0.6.1 lib/ruby_app/language.rb
RubyApp-0.5.95 lib/ruby_app/language.rb
RubyApp-0.5.99 lib/ruby_app/language.rb
RubyApp-0.5.98 lib/ruby_app/language.rb
RubyApp-0.5.97 lib/ruby_app/language.rb
RubyApp-0.5.96 lib/ruby_app/language.rb
RubyApp-0.5.94 lib/ruby_app/language.rb
RubyApp-0.5.93 lib/ruby_app/language.rb
RubyApp-0.5.92 lib/ruby_app/language.rb
RubyApp-0.5.91 lib/ruby_app/language.rb
RubyApp-0.5.90 lib/ruby_app/language.rb
RubyApp-0.5.89 lib/ruby_app/language.rb
RubyApp-0.5.88 lib/ruby_app/language.rb
RubyApp-0.5.87 lib/ruby_app/language.rb