You can translate your chat using slack translator.
You need to setup the following environment variables to integrate with Slack:
SLACK_API_TOKEN
: You can get the API Token from Slack Web APISLACK_WEBHOOK_URL
: You can get the Incoming Webhook URL from here
Also, you need to choose a translator vendor to use:
TRANSLATE_ENGINE
: The handle name of the translator vendor. Currently only supportgoogle
andnaver
.google
by default.
If you choose google
as your TRANSLATE_ENGINE
, you need to one more
environment variable for Google Translate API as well:
GOOGLE_API_KEY
: You can get the API Key from Google Developers Console
Note that you don't need any additional environment variables when you
choose naver
as your TRANSLATE_ENGINE
.
Then you can add Slash Commands to use translator.
- Commands:
/[target language]
- URL:
https://[host]/[source language]/[target language]
- Method:
POST
For example, if you are using Korean, and you want to add Korean->Japanese translation command, try to add Slash command like this.
- Commands:
/ja
- URL:
https://[host]/ko/ja
- Method:
POST