From d757a2dc91d21b8606ac4d552711e259057db45e Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Thu, 15 Aug 2019 11:30:11 +0200 Subject: [PATCH] Update intl.rst --- components/intl.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/intl.rst b/components/intl.rst index 861ae854c26..bd492fa2db0 100644 --- a/components/intl.rst +++ b/components/intl.rst @@ -172,12 +172,10 @@ of officially recognized countries and territories:: \Locale::setDefault('en'); - // Indexed with alpha-2 $countries = Countries::getNames(); // ('alpha2Code' => 'countryName') // => ['AF' => 'Afghanistan', 'AX' => 'Åland Islands', ...] - // Indexed with alhpa-3 $countries = Countries::getAlpha3Names(); // ('alpha3Code' => 'countryName') // => ['AFG' => 'Afghanistan', 'ALA' => 'Åland Islands', ...] @@ -188,6 +186,10 @@ of officially recognized countries and territories:: $country = Countries::getAlpha3Name('NOR'); // => 'Norway' +.. versionadded:: 4.4 + + The support for alpha3 codes was introduced in Symfony 4.4. + All methods accept the translation locale as the last, optional parameter, which defaults to the current default locale:: @@ -209,7 +211,7 @@ to catching the exception, you can also check if a given country code is valid:: $isValidCountry = Countries::exists($alpha2Code); -Or if you have a alpha3 country code you want to check: +Or if you have a alpha3 country code you want to check:: $isValidCountry = Countries::alpha3CodeExists($alpha3Code);