Represents a locale.

Methods
Attributes
[RW] map The localization map.
Public Class methods
new(map)
    # File lib/raw/util/localization.rb, line 14
14:   def initialize(map)
15:     parse_hash(map)
16:   end
Public Instance methods
[](*args)

Alias for #translate

translate(*args)

Transalte the given key.

args
An array of arguments. The first argument is the translation key. If additional arguments are provided they are used for sprintf interpolation.
This method is also aliased as []
    # File lib/raw/util/localization.rb, line 30
30:   def translate(*args)
31:     if xlated = @map[args.shift]
32:       if xlated.is_a?(String)
33:         args.empty? ? xlated : sprintf(xlated, *args)
34:       else
35:         xlated.call(*args)
36:       end
37:     end
38:   end