class ISO3166::Translations

Extend the hash class to allow locale lookup fall back behavior

ex: if a country has translations for pt, and the user looks up `pt-br` fallback to `pt` to prevent from showing nil values

Public Instance Methods

[](locale) click to toggle source
Calls superclass method
# File lib/countries/translations.rb, line 8
def [](locale)
  super(locale) || super(locale.to_s.sub(/-.*/, ''))
end