@@ -172,12 +172,10 @@ of officially recognized countries and territories::
172
172
173
173
\Locale::setDefault('en');
174
174
175
- // Indexed with alpha-2
176
175
$countries = Countries::getNames();
177
176
// ('alpha2Code' => 'countryName')
178
177
// => ['AF' => 'Afghanistan', 'AX' => 'Åland Islands', ...]
179
178
180
- // Indexed with alhpa-3
181
179
$countries = Countries::getAlpha3Names();
182
180
// ('alpha3Code' => 'countryName')
183
181
// => ['AFG' => 'Afghanistan', 'ALA' => 'Åland Islands', ...]
@@ -188,6 +186,10 @@ of officially recognized countries and territories::
188
186
$country = Countries::getAlpha3Name('NOR');
189
187
// => 'Norway'
190
188
189
+ .. versionadded :: 4.4
190
+
191
+ The support for alpha3 codes was introduced in Symfony 4.4.
192
+
191
193
All methods accept the translation locale as the last, optional parameter,
192
194
which defaults to the current default locale::
193
195
@@ -209,7 +211,7 @@ to catching the exception, you can also check if a given country code is valid::
209
211
210
212
$isValidCountry = Countries::exists($alpha2Code);
211
213
212
- Or if you have a alpha3 country code you want to check:
214
+ Or if you have a alpha3 country code you want to check::
213
215
214
216
$isValidCountry = Countries::alpha3CodeExists($alpha3Code);
215
217
0 commit comments