mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
Update HLS, FLV, and DASH player configurations
Update progress bar height in Artplayer Add dynamic layer, controller, menu, and setting item management Update Changelog_CN Update utils.js Update package.json Update built-in management in Artplayer Update i18n documentation Add support for new languages Update language import and modification
This commit is contained in:
1 parent
73fb04737a
commit
bbbeca6e4c
21 files changed
+931
-327
No files matched your search
@@ -1,20 +1,20 @@
|
||||
# Language
|
||||
# 语言设置
|
||||
|
||||
::: danger
|
||||
|
||||
In view of the fact that more and more languages are bundled, starting from version 5.1.0, the core code of `artplayer.js` will no longer bundle other languages except `Simplified Chinese` and `English`, and you need to import the required language.
|
||||
鉴于捆绑的多国语言越来越多, 从 `5.1.0` 版本开始, `artplayer.js` 核心代码除了包含 `简体中文` 和 `英文` 外, 不再捆绑其它多国语言, 需要自行导入需要的语言。
|
||||
|
||||
:::
|
||||
|
||||
:::warning
|
||||
|
||||
When the language cannot be matched, English will be displayed by default, i18n writing reference: [artplayer/types/i18n.d.ts](https://github.com/zhw2590582/ArtPlayer/blob/master/packages/artplayer/types/i18n.d.ts)
|
||||
当无法匹配到语言时, 会默认显示英文, i18n 写法参考: [artplayer/types/i18n.d.ts](https://github.com/zhw2590582/ArtPlayer/blob/master/packages/artplayer/types/i18n.d.ts)
|
||||
|
||||
:::
|
||||
|
||||
## Default language
|
||||
## 默认语言
|
||||
|
||||
The default languages are: `en`, `zh-cn`, no need to import manually
|
||||
默认语言有: `en`, `zh-cn`, 无需手动导入
|
||||
|
||||
```js{4}
|
||||
var art = new Artplayer({
|
||||
@@ -24,13 +24,13 @@ var art = new Artplayer({
|
||||
});
|
||||
```
|
||||
|
||||
## Import language
|
||||
## 导入语言
|
||||
|
||||
The language files before packaging are stored in: `artplayer/src/i18n/*.js`, welcome to add your language
|
||||
打包前的语言文件存放于: `artplayer/src/i18n/*.js`, 欢迎来添加你的语言
|
||||
|
||||
The packaged language files are stored in: `artplayer/dist/i18n/*.js`
|
||||
打包后的语言文件存放于: `artplayer/dist/i18n/*.js`
|
||||
|
||||
Manually imported languages are: `cs`, `es`, `fa`, `fr`, `id`, `pl`, `ru`, `zh-tw`
|
||||
手动导入的语言有: `cs`, `es`, `fa`, `fr`, `id`, `pl`, `ru`, `zh-tw`
|
||||
|
||||
::: code-group
|
||||
|
||||
@@ -66,7 +66,7 @@ var art = new Artplayer({
|
||||
|
||||
:::
|
||||
|
||||
## New language
|
||||
## 新增语言
|
||||
|
||||
```js{4-9}
|
||||
var art = new Artplayer({
|
||||
@@ -81,7 +81,7 @@ var art = new Artplayer({
|
||||
});
|
||||
```
|
||||
|
||||
## Change language
|
||||
## 修改语言
|
||||
|
||||
```js
|
||||
import zhTw from 'artplayer/i18n/zh-tw.js';
|
||||
|
||||
Reference in new issue
Block a user