Skip to content

Commit

Permalink
Handle Chinese Traditional
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed Sep 27, 2020
1 parent 60e8d5a commit a97cc66
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion externals/header.phtml
Expand Up @@ -22,7 +22,16 @@
}

$get_parms = $_GET;
if (isset($locale)) { $locale_str = substr($locale, 0, 2); } else { $locale_str = "en"; }

if (isset($locale)) {
if (substr($locale, 0, 2) != 'zh') {
$locale_str = substr($locale, 0, 2);
} else {
$locale_str = $locale == 'zh_TW' ? 'zh-Hant' : 'zh-Hans';
}
} else {
$locale_str = "en";
}
?>

<html lang="<?php echo $locale_str; ?>">
Expand Down

0 comments on commit a97cc66

Please sign in to comment.