38 lines
2.2 KiB
HTML
38 lines
2.2 KiB
HTML
<!doctype html>
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport"
|
||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||
<title>国际化样例</title>
|
||
</head>
|
||
<body>
|
||
<form>
|
||
<select class="lan_select">
|
||
<option class="lan_zh" value="zh_CN" selected>中文</option>
|
||
<option class="lan_en" value="en_US">英文</option>
|
||
</select>
|
||
</form>
|
||
<!--文本自动翻译demo区域----start -->
|
||
<form action="">
|
||
<label data-translate="name" for="name">姓名:</label><input data-translate-placeholder="name_placeholder" type="text" placeholder="" id="name" name="name" required><br>
|
||
<label data-translate="tel" for="phone">电话号码:</label><input data-translate-placeholder="tel_placeholder" type="tel" placeholder="" id="phone" name="phone" required><br>
|
||
<label data-translate="email" for="email">电子邮箱:</label><input data-translate-placeholder="email_placeholder" type="email" placeholder="" id="email" name="email"><br>
|
||
<label data-translate="address" for="address">地址:</label><input data-translate-placeholder="address_placeholder" type="text" placeholder="" id="address" name="address"><br>
|
||
<label data-translate="choose">选择器:</label><select id="mySelect"></select><br>
|
||
<button data-translate="save" type="button">保存</button>
|
||
<button data-translate="reset" type="button">重置</button>
|
||
</form>
|
||
<!--文本自动翻译demo区域----end -->
|
||
<!--主动翻译demo区域----start -->
|
||
<!--<label for="name">获取当前语言包下指定的key的翻译:</label><input type="text" value="test1" id="data_key" name="data_key" ><br>-->
|
||
<!--<button type="button" onclick="getKeyClick()">获取</button>-->
|
||
<!--<div id="data_key_text"></div>-->
|
||
<!--主动翻译demo区域----end -->
|
||
<script type="application/javascript" src="js/jquery-3.7.1.min.js"></script>
|
||
<script type="application/javascript" src="js/jquery.cookie.js"></script>
|
||
<script type="application/javascript" src="js/jquery.i18n.properties.js"></script>
|
||
<script type="application/javascript" src="js/language.js"></script>
|
||
|
||
</body>
|
||
</html> |