Summary | Discourse Translator translates posts on Discourse using Microsoft, Google, or Yandex translation APIs. | |
Repository Link | https://github.com/discourse/discourse-translator | |
Install Guide | How to install plugins in Discourse |
Features
- Each post is only translated once per locale which saves you
- Note that language detection is also run once for every post. Be careful when enabling this on old and large forums.
- Access Token is cached server side for faster translations.
- Translations are rate limited to 3 per minute by default (admins can configure this value)
Translation Services Supported
Configuration Steps
Microsoft
-
Follow the steps in Microsoft Translator API on Azure to obtain a subscription key. You may pick from any of the available subscription offers.
-
In your Discourse, under Admin > Settings > Plugins, enter the subscription key that youāve obtained from the steps above.
- In your Discourse, under Admin > Settings > Basic Setup, enable allow user locale.
Google Translator
-
Click on My Project
- Click on the to create a new project
-
Enter your project name and click create
-
Select Enable API and search for Google Cloud Translator API. Look for the enable button and click it to enable the API. Note that there is no free tier for the Google Translator API so it may prompt you to enable billing.
-
Once youāre done, click on credentials in the left menu
-
Click create credentials and select API key. Copy the API Key and paste it into the
translator google api key
site setting in Discourse. -
In Discourse, under Admin > Settings > Basic Setup, enable allow user locale.
Settings
Name | Description |
---|---|
translator enabled | Allow inline translation of posts. |
translator | The provider of the translation service. |
translator azure subscription key | Azure Subscription Key |
translator azure region | Azure Region |
translator azure custom subdomain | Required if using a Virtual Network or Firewall for Azure Cognitive Services. Note: Only enter the custom subdomain not the full custom endpoint. |
translator aws region | AWS Region |
translator aws key id | AWS Key ID |
translator aws secret access | AWS secret access key |
translator aws iam role | AWS IAM Role |
translator google api key | Google API Key |
translator yandex api key | Yandex API Key |
translator libretranslate endpoint | LibreTranslate Endpoint |
translator libretranslate api key | LibreTranslate API Key |
max translations per minute | The number of translations per minute a regular user can perform. |
restrict translation by group | Only allowlisted groups can translate |
restrict translation by poster group | Only allow translation of posts made by allowlisted users |
Known Issues
- Does not translate text within polls generated by discourse-poll plugin.
- Images are enlarged upon translating.
Hosted by us? This plugin is available on our Enterprise plan.
Last edited by @JammyDodger 2024-06-18T14:19:34Z
Check document
Perform check on document: