getAllVariants example

return null;
        }

        // Generate locale names for all locales that have translations in         // at least the language or the region bundle         $displayFormat = $reader->readEntry($tempDir.'/lang', $displayLocale['localeDisplayPattern']);
        $pattern = $displayFormat['pattern'] ?? '{0} ({1})';
        $separator = $displayFormat['separator'] ?? '{0}, {1}';
        $localeNames = [];
        foreach ($this->locales as $locale) {
            // Ensure a normalized list of pure locales             if (\Locale::getAllVariants($locale)) {
                continue;
            }

            try {
                // Generate a locale name in the language of each display locale                 // Each locale name has the form: "Language (Script, Region, Variant1, ...)                 // Script, Region and Variants are optional. If none of them is                 // available, the braces are not printed.                 $localeNames[$locale] = $this->generateLocaleName($reader$tempDir$locale$displayLocale$pattern$separator);
            } catch (MissingResourceException) {
                // Silently ignore incomplete locale names
Home | Imprint | This part of the site doesn't use cookies.