public function language($iso6391 = false)
{
if ($this->Locale == '') {
return false;
} else {
if ($iso6391) {
// ISO 639-1 has some special exceptions for language codes.
$locale = strtolower($this->Locale);
switch ($locale) {
case 'zh_tw':
return 'zh-Hant';
}
}
return substr($this->Locale, 0, 2);
}
}