JoliTypo\Fixer\Hyphen::fixLocale PHP Метод

fixLocale() защищенный Метод

Transform fr_FR to fr to fit the list of supported locales.
protected fixLocale ( $locale ) : mixed
$locale
Результат mixed
    protected function fixLocale($locale)
    {
        if (in_array($locale, $this->supportedLocales)) {
            return $locale;
        }
        if (($short = Fixer::getLanguageFromLocale($locale)) !== $locale) {
            if (in_array($short, $this->supportedLocales)) {
                return $short;
            }
        }
        // If no better locale found...
        return $locale;
    }