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.7.16 lib/ruby_app/language.rb
RubyApp-0.7.15 lib/ruby_app/language.rb
RubyApp-0.7.14 lib/ruby_app/language.rb
RubyApp-0.7.13 lib/ruby_app/language.rb
RubyApp-0.7.12 lib/ruby_app/language.rb
RubyApp-0.7.11 lib/ruby_app/language.rb
RubyApp-0.7.10 lib/ruby_app/language.rb
RubyApp-0.7.9 lib/ruby_app/language.rb
RubyApp-0.7.5 lib/ruby_app/language.rb
RubyApp-0.7.4 lib/ruby_app/language.rb
RubyApp-0.7.3 lib/ruby_app/language.rb
RubyApp-0.7.2 lib/ruby_app/language.rb
RubyApp-0.7.1 lib/ruby_app/language.rb
RubyApp-0.7.0 lib/ruby_app/language.rb
RubyApp-0.6.71 lib/ruby_app/language.rb
RubyApp-0.6.70 lib/ruby_app/language.rb
RubyApp-0.6.69 lib/ruby_app/language.rb
RubyApp-0.6.68 lib/ruby_app/language.rb
RubyApp-0.6.67 lib/ruby_app/language.rb
RubyApp-0.6.66 lib/ruby_app/language.rb