Parent

R18n::UnsupportedLocale

Locale without information file. Contain only it code, empty title and data from default locale.

Attributes

base[RW]

Locale, to get data and pluralization for unsupported locale.

Public Class Methods

new(code, base = nil) click to toggle source

Create object for unsupported locale with code and load other locale data from base locale.

# File lib/r18n-core/unsupported_locale.rb, line 29
def initialize(code, base = nil)
  @code = code
  @base = Locale.load(I18n.default) if @code != I18n.default
end

Public Instance Methods

==(locale) click to toggle source

Is another locale has same code.

# File lib/r18n-core/unsupported_locale.rb, line 55
def ==(locale)
  @code.downcase == locale.code.downcase
end
code() click to toggle source

Locale RFC 3066 code.

# File lib/r18n-core/unsupported_locale.rb, line 45
def code
  @code
end
inspect() click to toggle source

Human readable locale code and title.

# File lib/r18n-core/unsupported_locale.rb, line 40
def inspect
  "Unsupported locale #{@code}"
end
method_missing(name, *params) click to toggle source

Proxy to default locale object.

# File lib/r18n-core/unsupported_locale.rb, line 60
def method_missing(name, *params)
  @base.send(name, *params)
end
supported?() click to toggle source

Is locale has information file. In this class always return false.

# File lib/r18n-core/unsupported_locale.rb, line 35
def supported?
  false
end
title() click to toggle source

Locale code as title.

# File lib/r18n-core/unsupported_locale.rb, line 50
def title
  @code
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.