Tiger_I18n_Country

@api

Tiger_I18n_Country — the country list, localized + biased-sorted.

Reads a standalone data file, library/Tiger/I18n/country.ini (NOT in the config cascade — it's static reference data, loaded lazily here, cached for the request). Each ISO-3166 alpha-2 section carries its alpha-3 code and a sort weight; a positive weight is a "common" country that floats to the top of the picker (so United States sits at the top, not buried under "U"), and 0 means normal alphabetical placement.

The NAME is never stored here: it resolves as a Tiger translation key country.<ISO2> (so an install can override it), falling back to CLDR via Zend_Locale (authoritative, localized for every locale — no 250×N strings to hand-maintain).

Methods

name()

name(string $iso2, ?string $locale = null): string

Localized name for a country: translation override (country.) then CLDR.

  • $iso2 string — ISO-3166 alpha-2 country code
  • $locale ?string — locale to localize into, or null for the current locale

Returns string — the localized country name, or the code if unresolved

all()

all(?string $locale = null): array

All countries as [iso2 => localized name], biased sort (common first, then A–Z).

  • $locale ?string — locale to localize into, or null for the current locale

Returns array — map of ISO-3166 alpha-2 code => localized name

options()

options(?string $locale = null, string $placeholder = '— Select —'): array