function lingotek_drupal_language in Lingotek Translation 6
1 call to lingotek_drupal_language()
File
- ./
lingotek.reference.inc, line 212
Code
function lingotek_drupal_language($locale) {
global $_lingotek_locale;
$locale = strtolower(str_replace("_", "-", $locale));
if (array_key_exists($locale, $_lingotek_locale)) {
return $locale;
}
else {
if ($locale == "zh-cn") {
return "zh-hans";
}
elseif ($locale == "zh-tw") {
return "zh-hant";
}
return substr($locale, 0, strpos($locale, '-'));
}
}