class LocaleScanner
Scans a directory with data files for locales.
The name of each file with the extension ".txt" is considered, if it "looks" like a locale:
For example, "de" and "de_DE" are considered to be locales. "root" and "meta" are not.
array | scanLocales(string $sourceDir) Returns all locales found in the given directory. | |
array | scanAliases(string $sourceDir) Returns all locale aliases found in the given directory. |
Returns all locales found in the given directory.
string | $sourceDir | The directory with ICU files |
array | An array of locales. The result also contains locales that are in fact just aliases for other locales. Use {@link scanAliases()} to determine which of the locales are aliases |
Returns all locale aliases found in the given directory.
string | $sourceDir | The directory with ICU files |
array | An array with the locale aliases as keys and the aliased locales as values |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Intl/Data/Util/LocaleScanner.html