Sha256: 8ff1f7131e6941dee71d0a87e9ebc8df93b311420e5a90700a8d45fedaf96960

Contents?: true

Size: 482 Bytes

Versions: 15

Compression:

Stored size: 482 Bytes

Contents

module Localization
  extend Log
	DEFAULT_LANGUAGE = :en
  RESOURCE_EXTENSION = "localization.yaml"

  class << self
    def default_language= lang
      @default_language = lang
    end

    def default_language
      @default_language ||= DEFAULT_LANGUAGE
    end

    def language= block
      @language = block
    end

    def language
      if @language
				lang = @language.call
				return lang || default_language
			else
				return default_language
			end
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
ruby-ext-0.2.16 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.15 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.13 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.12 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.11 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.10 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.9 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.8 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.7 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.6 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.5 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.4 old/lib/RubyExt/Localization.rb
ruby-ext-0.2.3 old/lib/RubyExt/Localization.rb
RubyExt-0.1.1 lib/RubyExt/Localization.rb
RubyExt-0.1.2 lib/RubyExt/Localization.rb