mountbatt/kirby-deepl-fields
Composer 安装命令:
composer require mountbatt/kirby-deepl-fields
包简介
Kirby 3 DeepL Fields
关键字:
README 文档
README
Kirby plugin to translate input and textarea fields with DeepL (Free & Pro API).
Features:
- Detects base language of your Site and offers translation button to translate the field content
- Can import the field value from the base language
- Can be used with DeepL Free and Pro API
- Supports input field and textarea right now
- Keeps all formattings of a textarea field. Even HTML-Tags
kirby-deepl-fields.mp4
Installation
This plugin requires PHP 8.0 and Kirby 3.6.0 or higher.
Download and copy this repository to /site/plugins/kirby-deepl-fields
Alternatively, you can install it with composer: composer require mountbatt/kirby-deepl-fields
Setup
Fields
This field can replace any text and textarea field you have set up, and works out of the box with as little config as:
Textarea:
editor: label: My translatable Field inputtype: textarea size: large type: deepl
Text Input:
editor: label: My translatable Field inputtype: text type: deepl
DeepL API in site/config/config.php
First you have to register at DeepL to get an API-Key here: https://www.deepl.com/en/pro-api
You can decide if you want to use the free API or buy a PRO plan. Both works and depends on your quota.
After registration you get the API-Key and the API-URL. Copy those values in the config.php setting.
The free-API URL is at the moment: https://api-free.deepl.com/v2/translate
<?php
return [
mountbatt.deepl.config' => [
'api_key' => '<your-api-key>',
'api_url' => '<your-deepl-api-url>'
]
]
Options
Available options
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
| inputtype | String | true |
- | can be text and textarea |
| size | String | false |
- | If textarea you can set small, medium, large, huge |
License
MIT
mountbatt/kirby-deepl-fields 适用场景与选型建议
mountbatt/kirby-deepl-fields 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 745 次下载、GitHub Stars 达 29, 最近一次更新时间为 2022 年 11 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「translation」 「deepl」 「kirby3」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mountbatt/kirby-deepl-fields 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mountbatt/kirby-deepl-fields 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mountbatt/kirby-deepl-fields 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A custom URL rule class for Yii 2 which allows to create translated URL rules
DeepL API client wrapper for Laravel
A Laravel Eloquent model trait for translatable resource
With this Bundle you can automatically translate your content via DeepL Interface.
This extension provides option to translate content element, and tca record texts to Deepl and Google supported languages using Deepl and Googletranslate Api services.
Deepl Automated translations for Laravel lang files
统计信息
- 总下载量: 745
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 29
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-18