Skip to content

spoqa/slack-translator

Repository files navigation

Slack Translator

Deploy Build Status Coverage Status

You can translate your chat using slack translator.

2015-11-07 12 19 14

How to Setup

You need to setup the following environment variables to integrate with Slack:

  • SLACK_API_TOKEN: You can get the API Token from Slack Web API
  • SLACK_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 support google and naver. google by default.

Google translator

If you choose google as your TRANSLATE_ENGINE, you need to add one more environment variable for Google Translate API as well:

Naver translator

If you choose naver as your TRANSLATE_ENGINE, you need to add two more environment variable for Naver Translator API as well:

Then you can add Slash Commands to use translator.

  1. Commands: /[target language]
  2. URL: https://[host]/[source language]/[target language]
  3. 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.

  1. Commands: /ja
  2. URL: https://[host]/ko/ja
  3. Method: POST

Meeting mode

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.

Installation

You'll need to set up a Slack App in addition to to setting up slash commands above.

  1. Create a Slack App
  2. Set up Event Subscriptions
  3. Add Slack Commands for starting meeting mode.
    • example) Command to translate every japanese in this channel to korean.
    • Commands: /会議開始
    • URL: http://your-app.herokuapp.com/start_meeting_mode/ja/ko
    • example) Command to stop meeting mode in this channel.
    • Commands: /会議終了
    • URL: http://your-app.herokuapp.com/stop_meeting_mode/

About

You can translate your chat using slack translator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages