src/Dictionary/Dictionary.php
private function unifyLocale($locale)
    {
        if (2 == strlen($locale)) {
            return strtolower($locale);
        }
        if (preg_match('/([a-zA-Z]{2})[^a-zA-Z]+([a-zA-Z]{2})/i', $locale, $result)) {
            return strtolower($result[1]) . '_' . strtoupper($result[2]);
        }

        return (string) $locale;
    }
private function unifyLocale($locale)
    {
        if (2 == strlen($locale)) {
            return strtolower($locale);
        }
        if (preg_match('/([a-zA-Z]{2})[^a-zA-Z]+([a-zA-Z]{2})/i', $locale, $result)) {
            return strtolower($result[1]) . '_' . strtoupper($result[2]);
        }

        return (string) $locale;
    }
Unify the given locale to a default format.

For that in a 2 by 2 format the whole string is splited, the first part
lowercased, the sewcond part upercased and concatenated with n under-
score.

a 2letter locae will simply be lowercased.

everything else will be returned AS IS

@param string $locale The locale to unify

@return string