API reference / Quittio \ Core \ View
CountryNames
final class in quittio/core
Quittio\Core\View\CountryNames · Source
Country names from ext-intl with the ISO code as fallback.
Methods#
| Method | Description |
|---|---|
::name() | Name of the country with ISO 3166-1 alpha-2 code $code in $locale, e.g. "Deutschland" for "DE" in "de"; the code itself without ext-intl or for an unknown code. |
name()#
public static function name(string $code, string $locale = 'en'): stringName of the country with ISO 3166-1 alpha-2 code $code in $locale, e.g. "Deutschland" for "DE" in "de"; the code itself without ext-intl or for an unknown code.
| Parameter | Type | Description |
|---|---|---|
$code | string | |
$locale | string = 'en' |
- Returns
string