class ISO3166::Country

def subdivision_names_with_codes(locale = 'en')

Returns:
  • (Array) - This Country's subdivision pairs of names and codes.

Parameters:
  • locale (String) -- The locale to use for translations.
def subdivision_names_with_codes(locale = 'en')
  subdivisions.map { |k, v| [v.translations[locale] || v.name, k] }
end