Skip to content

Commit 1078504

Browse files
committed
update docs
1 parent 91aa2e0 commit 1078504

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

docs/index.md

+17-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
版本:v1.1
2+
3+
by [xuanzhi33](http://www.xuanzhi33.top)
4+
5+
## 引入
6+
1. 请将本js在`</body>`前引入
7+
2. 在引入本js前需先引入jQuery库
8+
- 如: `<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.0/dist/jquery.min.js"></script>`
9+
3. 您可下载本仓库中的translate.js后引入或者直接使用cdn引入
10+
111
## 用法:
2-
1.在引入本js前需先引入jQuery
3-
2.本js用于为中文网页创建英文版本
4-
3.请将本js在</body>前引入
5-
4.格式:<element en="[英语内容]">[中文原文]</element>
6-
如 <p en="helloworld">你好世界</p>
7-
5.语言切换方式
8-
自动切换:系统语言为英文时访问该页面将自动显示为英文。
9-
手动切换:需在页面上添加class为transBtn的按钮,用户点击该按钮来切换语言。
12+
1. 在引入本js前需先引入jQuery库
13+
2. 本js用于为中文网页创建英文版本
14+
3. 格式:`<element en="[英语内容]">[中文原文]</element>`
15+
- 如: `<p en="helloworld">你好世界</p>`
16+
4. 语言切换方式
17+
- 自动切换:系统语言为英文时访问该页面将自动显示为英文。
18+
- 手动切换:需在页面上添加class为transBtn的按钮,用户点击该按钮来切换语言。

0 commit comments

Comments
 (0)