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
// In this case one should configure at least one fallback locale that is complete (e.g. English) during
// runtime. Alternatively a translation for the missing resource can be proposed upstream.
} } $data =
[ 'Names' =>
$localeNames,
];