level51/silverstripe-fluent-autotranslate 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

level51/silverstripe-fluent-autotranslate

最新稳定版本:1.0.1

Composer 安装命令:

composer require level51/silverstripe-fluent-autotranslate

包简介

Module for auto translation using Google Translate or OpenAI for Silverstripe with Fluent

README 文档

README

Module for auto translation using Google Cloud Translation for Silverstripe with Fluent.

Content

Requirements

Installation

composer require level51/silverstripe-fluent-autotranslate

Setup Google Cloud Translation API

Define the API key for the Google Cloud Translation API like this:

Level51\Autotranslate\AutotranslateFieldExtension:
    translation_provider: 'google' # 'google' or 'openai' (default: google)
    google_cloud_translation_api_key: 'YOUR_API_KEY'

See https://cloud.google.com/translate/docs/setup for setup instructions.

Setup OpenAI API

See https://platform.openai.com/docs/quickstart/create-and-export-an-api-key for setup instructions and how to get an API key.

Define the API key for the OpenAI API like this in your config.yml:

Level51\Autotranslate\AutotranslateFieldExtension:
  translation_provider: 'openai' # 'google' or 'openai' (default: google)
  openai_translation_api_key: 'YOUR_API_KEY'

For Open AI you can specify terms to avoid translation by adding them to the openai_translation_blacklist in the backend admin settings. If you want to use this feature you have to add the BlackListExtension to the SiteConfig class.

SilverStripe\SiteConfig\SiteConfig:
  extensions:
    - Level51\Autotranslate\BlackListExtension

Maintainer

Disable extension for specific field types

Level51\Autotranslate\AutotranslateFieldExtension:
  class_blacklist:
    - SilverStripe\Forms\HTMLEditor\HTMLEditorField

统计信息

  • 总下载量: 2.71k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固