src/JoliTypo/Fixer/Hyphen.php
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;
    }
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;
    }
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 ; }
Transform fr_FR to fr to fit the list of supported locales.

@param $locale

@return mixed
Transform fr_FR to fr to fit the list of supported locales .