1 Star 0 Fork 0

杭州朝厚信息科技有限公司/api_javascript_sample

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.html 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
Jeffery ZHAO 提交于 2024-03-04 19:12 +08:00 . add English
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Redirecting...</title>
<script>
// Check if the browser's preferred language is Chinese
const userLanguage = navigator.language || navigator.userLanguage;
const isChinese = userLanguage.startsWith('zh');
// Redirect accordingly
if (isChinese) {
const simplifiedChinese = ['zh', 'zh-CN', 'zh-SG'];
const traditionalChinese = ['zh-TW', 'zh-HK', 'zh-MO'];
// Redirect to index_cn.html for Simplified Chinese or Traditional Chinese
if (simplifiedChinese.includes(userLanguage) || traditionalChinese.includes(userLanguage)) {
window.location.href = 'index_cn.html';
} else {
window.location.href = 'index_en.html';
}
} else {
window.location.href = 'index_en.html';
}
</script>
</head>
<body>
<p>Redirecting to the appropriate page...</p>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chohotech/api_javascript_sample.git
git@gitee.com:chohotech/api_javascript_sample.git
chohotech
api_javascript_sample
api_javascript_sample
master

搜索帮助