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 add one more
environment variable for Google Translate API as well:
GOOGLE_API_KEY
: You can get the API Key from Google Developers Console
If you choose naver
as your TRANSLATE_ENGINE
, you need to add two more
environment variable for Naver Translator API as well:
NAVER_CLIENT_ID
/NAVER_CLIENT_SECRET
: You can get the API Key from Naver Developer Website
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
Translate every messages in a channel without the need to type in commands with "Meeting Mode". This feature makes uninterrupted flow of communication possible, and integrates into normal conversation smoothly.
To use this feature additional setup is required.
You'll need to set up a Slack App in addition to to setting up slash commands above.
- Create a Slack App
- Set up Event Subscriptions
- Verify url by setting up
Request URL
tohttps://[host]/meeting_mode
- example) https://your-app.herokuapp.com/meeting_mode
- Subscribe to message.channels event.
- Verify url by setting up
- Add Slack Commands for starting meeting mode.
- example) Command to translate every japanese in this channel to korean.
- Commands:
/会議開始
- URL:
https://your-app.herokuapp.com/start_meeting_mode/ja/ko
- example) Command to stop meeting mode in this channel.
- Commands:
/会議終了
- URL:
https://your-app.herokuapp.com/stop_meeting_mode/