mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-30 03:51:25 -08:00
Update build:docs and trans:docs scripts
This commit is contained in:
1 parent
a2d3e20479
commit
a2b57495a2
20 files changed
+749
-775
No files matched your search
@@ -1,20 +1,20 @@
|
||||
# 语言设置
|
||||
# Language Settings
|
||||
|
||||
::: danger
|
||||
|
||||
鉴于捆绑的多国语言越来越多, 从 `5.1.0` 版本开始, `artplayer.js` 核心代码除了包含 `简体中文` 和 `英文` 外, 不再捆绑其它多国语言, 需要自行导入需要的语言。
|
||||
Given the increasing number of bundled multilingual packs, starting from version `5.1.0`, the core code of `artplayer.js` will no longer include other languages besides `Simplified Chinese` and `English`. You need to import the required languages on your own.
|
||||
|
||||
:::
|
||||
|
||||
:::warning
|
||||
|
||||
当无法匹配到语言时, 会默认显示英文, i18n 写法参考: [artplayer/types/i18n.d.ts](https://github.com/zhw2590582/ArtPlayer/blob/master/packages/artplayer/types/i18n.d.ts)
|
||||
When a language cannot be matched, English will be displayed by default. For i18n usage, refer to: [artplayer/types/i18n.d.ts](https://github.com/zhw2590582/ArtPlayer/blob/master/packages/artplayer/types/i18n.d.ts)
|
||||
|
||||
:::
|
||||
|
||||
## 默认语言
|
||||
## Default Languages
|
||||
|
||||
默认语言有: `en`, `zh-cn`, 无需手动导入
|
||||
The default languages are: `en`, `zh-cn`, which do not require manual import.
|
||||
|
||||
```js{4}
|
||||
var art = new Artplayer({
|
||||
@@ -24,13 +24,12 @@ var art = new Artplayer({
|
||||
});
|
||||
```
|
||||
|
||||
## 导入语言
|
||||
## Importing Languages
|
||||
|
||||
打包前的语言文件存放于: `artplayer/src/i18n/*.js`, 欢迎来添加你的语言
|
||||
Language files before packaging are located in: `artplayer/src/i18n/*.js`. You are welcome to add your language.
|
||||
Packaged language files are located at: `artplayer/dist/i18n/*.js`
|
||||
|
||||
打包后的语言文件存放于: `artplayer/dist/i18n/*.js`
|
||||
|
||||
手动导入的语言有: `cs`, `es`, `fa`, `fr`, `id`, `pl`, `ru`, `zh-tw`
|
||||
Manually imported languages include: `cs`, `es`, `fa`, `fr`, `id`, `pl`, `ru`, `zh-tw`
|
||||
|
||||
::: code-group
|
||||
|
||||
@@ -65,8 +64,7 @@ var art = new Artplayer({
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
## 新增语言
|
||||
## Add Language
|
||||
|
||||
```js{4-9}
|
||||
var art = new Artplayer({
|
||||
@@ -81,7 +79,7 @@ var art = new Artplayer({
|
||||
});
|
||||
```
|
||||
|
||||
## 修改语言
|
||||
## Modify Language
|
||||
|
||||
```js
|
||||
import zhTw from 'artplayer/i18n/zh-tw.js';
|
||||
|
||||
Reference in new issue
Block a user