Discourse 翻译器

||||
-|-|
:discourse2: | 摘要 | Discourse Translator 使用 Microsoft、Google 或 Yandex 翻译 API 来翻译 Discourse 中的帖子。
:hammer_and_wrench: | 仓库链接 | https://github.com/discourse/discourse-translator
:open_book: | 安装指南 | 如何在 Discourse 中安装插件

功能

  • 每个帖子在每个区域设置下仅翻译一次,从而为您节省 :moneybag:
    • 请注意,语言检测也是针对每个帖子运行一次的。在旧的大型论坛启用此功能时要小心。
  • Access Token 在服务器端缓存,以实现更快的翻译。
  • 默认情况下,翻译速率限制为每分钟 3 次(管理员可以配置此值)

支持的翻译服务

配置步骤

Microsoft
  1. 按照 Azure 上的 Microsoft Translator API 中的步骤获取订阅密钥。您可以从任何可用的订阅优惠中选择。

  2. 在您的 Discourse 中,进入 管理员 > 设置 > 插件,输入您从上述步骤中获得的订阅密钥。

  1. 在您的 Discourse 中,进入 管理员 > 设置 > 基本设置,启用允许用户区域设置。
Google Translator
  1. 前往 https://console.developers.google.com

  2. 点击我的项目

  1. 点击 :heavy_plus_sign: 以创建新项目

  1. 输入项目名称并点击创建

  2. 选择 启用 API 并搜索 Google Cloud Translator API。找到 启用 按钮并点击它来启用该 API。请注意,Google Translator API 没有免费套餐,因此系统可能会提示您启用计费。

  3. 完成后,点击左侧菜单中的凭据

  1. 点击 创建凭据 并选择 API 密钥。复制 API 密钥并将其粘贴到 Discourse 中的 translator google api key 站点设置中。

  2. 在 Discourse 中,进入 管理员 > 设置 > 基本设置,启用允许用户区域设置。

设置

名称 描述
translator enabled 允许帖子的内联翻译。
translator 翻译服务的提供商。
translator azure subscription key Azure 订阅密钥
translator azure region Azure 区域
translator azure custom subdomain 如果使用 Azure Cognitive Services 的虚拟网络或防火墙,则需要此项。注意:仅输入自定义子域名,不要输入完整的自定义端点。
translator aws region AWS 区域
translator aws key id AWS 密钥 ID
translator aws secret access AWS 秘密访问密钥
translator aws iam role AWS IAM 角色
translator google api key Google API 密钥
translator yandex api key Yandex API 密钥
translator libretranslate endpoint LibreTranslate 端点
translator libretranslate api key LibreTranslate API 密钥
max translations per minute 普通用户每分钟可执行的翻译次数。
restrict translation by group 仅允许白名单中的组进行翻译
restrict translation by poster group 仅允许翻译白名单中用户发布的帖子

已知问题

  • 不翻译由 discourse-poll 插件生成的投票中的文本。
  • 翻译时图片会被放大。

:discourse2: 由我们托管? 此插件在我们的企业计划中可用。

103 个赞
Advice for bilingual communities
Inline translation of posts into another language
Language Translation
Can we have have one post with two different language
Plugin for signatures?
Translate plugin installed, but no translate button
LibreTranslate Plugin -- Free and Open Source Translation API
Discourse Translator plugin is not showing for non-logged in users
What exactly are the effects of "allow user locale"
DeepL integration for Translator plugin
How do you use Discourse AI? Tell us and make it even better!
How do I get the forum here in German
Is Google translate really so expensive?
Anyone migrated to version 3 of Microsoft Translator API yet?
Moving up the translator icon
Image zoom is not working
Translating text in polls
Yandex Translation Service
Anyone Using Discourse Translator Plugin on small forum, Cost/month?
FYI, Full translation of Discourse including posts is possible
Mute ALL other languages
How to install a plugin on Discourse-hosted-Discourse?
Make a multi-language forum
How to handle users that don't really read the answers they get?
Localized email templates
Translates to user's local language
DeepL integration for Translator plugin
Javascript pop up block help
No errors, instance not coming back up after rebuild
DeepL support for Discourse Translator
Getting user profile custom field via JS
Google Translate shows "blank" page
What exactly are the effects of "allow user locale"
Virtual Keyboard hides critical editor buttons for 3.3.0-beta
Translation from Lugandan yields uncaught 500 error (in a different Discourse)
Is Automatic Translation for Most Content Now Official?
Everything is translated, help!
Virtual Keyboard hides critical editor buttons for 3.3.0-beta
Translation support about the topic content
Translates to user's local language
Structuring a multilingual community
Translate email notifications and digests into user preferred locale language
Implementing In-House Translation Features on Discourse
Include translated posts in search?
Translate email notifications and digests into user preferred locale language
Changing default language will not change the site TITLE or DESCRIPTION!
Yandex Translation Service
Simple idea for translator-assisted bilingual forum
MKJ's Opinionated Discourse Deployment Configuration
Help which plugin is in the screenshot
Übersetzung wie hier auf Meta