atk14/live-translator
最新稳定版本:v0.1.2
Composer 安装命令:
composer require atk14/live-translator
包简介
README 文档
README
Installation
cd path/to/your/project/
composer require atk14/live-translator
ln -s ../../../vendor/atk14/live-translator/src/app/forms/api/live_translator app/forms/api/
ln -s ../../../vendor/atk14/live-translator/src/app/controllers/api/live_translator_controller.php app/controllers/api/
Edit gulpfile-admin.js and add live_translator.js to vendorScripts
var vendorScripts = [
...
"vendor/atk14/live-translator/src/public/scripts/utils/live_translator.js"
];
TODO: Describe changes in app/forms/admin/admin_form.php
Configuration
By default LiveTranslator is using Google API. If translation using DeepL.com is required, the following two constants must be defined:
define("LIVE_TRANSLATOR_DEEPL_API_AUTH_KEY","34567012-9a78-debc-f012-789abc456de0:fx");
define("LIVE_TRANSLATOR_DEEPL_API_PRO",false); // true or false
Source language
Source language for translation is taken automatically from the lang attribute in <htm> element (e.g. <html lang="cs">).
In attribute data-live_translator_source_lang the other source language can be specified implicitly (e.g. <html lang="cs" data-live_translator_source_lang="en">).
统计信息
- 总下载量: 1.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-06-14