class Locale::Info::Language
languages. This class is immutable once constructed.
This class contains all the of the ISO information for the ISO 639-3
def ancient?; @ancient; end
def ancient?; @ancient; end
def constructed?; @constructed; end
def constructed?; @constructed; end
def extinct?; @extinct; end
def extinct?; @extinct; end
def historical?; @historical; end
def historical?; @historical; end
def individual?; @individual; end
def individual?; @individual; end
def initialize(two_code, three_code, scope, type, name)
* name The name of the language.
or (S)pecial.
(C)onstructed, (E)xtinct, (H)istorical, (L)iving,
* type A single character that defines the ISO type of the language - (A)ncient,
(M)acrolanguage, or (S)pecial.
* scope A single character that defines the ISO scope of the language - (I)ndividual,
* code The 2 or 3 digit ISO 639-3 language code.
Constructs a new Language instance.
def initialize(two_code, three_code, scope, type, name) @two_code, @three_code, @scope, @type, @name = two_code, three_code, scope, type, name @individual = (scope == "I") @macro = (scope == "M") @special = (scope == "S") @constructed = (type == "C") @living = (type == "L") @extinct = (type == "E") @ancient = (type == "A") @historical = (type == "H") @special_type = (type == "S") end
def iso_language?
def iso_language? @@lang_two_codes[two_code] != nil || @@lang_three_codes[three_code] != nil end
def living?; @living; end
def living?; @living; end
def macro?; @macro; end
def macro?; @macro; end
def special?; @special; end
def special?; @special; end
def special_type?; @special_type; end
def special_type?; @special_type; end
def to_s
def to_s if two_code and two_code.size > 0 two_code else three_code end end