public static function langToLocale($lang)
    {
        $defaultLocale = 'C';
        $langs         = [];
        foreach (self::$alllngs as $langCode => $language) {
            $langs[$langCode] = [strstr($langCode, '_') ? substr($langCode, 0,
                    strpos($langCode, '_')) : $langCode, $language];
        }
        foreach ($langs as $code => $langInfo) {
            if ($lang == $langInfo[0]) {
                $defaultLocale = $code;
                break;
            }
        }
        return $defaultLocale;
    }