@@ -240,6 +240,10 @@ which defaults to the current default locale::
240240 $languages = Languages::getNames('de');
241241 // => ['ab' => 'Abchasisch', ...]
242242
243+ You can also check if a given language code is valid::
244+
245+ $isValidLanguage = Languages::exists($languageCode);
246+
243247.. versionadded :: 4.3
244248
245249 The ``Languages `` class was introduced in Symfony 4.3.
@@ -259,6 +263,10 @@ for traditional Chinese)::
259263 $script = Scripts::getName('Hans');
260264 // => 'Simplified'
261265
266+ You can also check if a given script code is valid::
267+
268+ $isValidScript = Scripts::exists($scriptCode);
269+
262270.. versionadded :: 4.3
263271
264272 The ``Scrcipts `` class was introduced in Symfony 4.3.
@@ -288,6 +296,10 @@ which defaults to the current default locale::
288296 $countries = Regions::getNames('de');
289297 // => ['AF' => 'Afghanistan', ...]
290298
299+ You can also check if a given region code is valid::
300+
301+ $isValidRegion = Regions::exists($regionCode);
302+
291303.. versionadded :: 4.3
292304
293305 The ``Regions `` class was introduced in Symfony 4.3.
@@ -316,6 +328,10 @@ which defaults to the current default locale::
316328 $locales = Locales::getNames('de');
317329 // => ['af' => 'Afrikaans', ...]
318330
331+ You can also check if a given locale code is valid::
332+
333+ $isValidLocale = Locales::exists($localeCode);
334+
319335.. versionadded :: 4.3
320336
321337 The ``Locales `` class was introduced in Symfony 4.3.
@@ -352,6 +368,10 @@ the current default locale::
352368 $currencies = Currencies::getNames('de');
353369 // => ['AFN' => 'Afghanische Afghani', ...]
354370
371+ You can also check if a given currency code is valid::
372+
373+ $isValidCurrency = Currencies::exists($currencyCode);
374+
355375.. versionadded :: 4.3
356376
357377 The ``Currencies `` class was introduced in Symfony 4.3.
0 commit comments