Skip to content

CC Dev

Menu
  • Home
  • Translation Tool
  • Social Media
Menu

Translation Tool

What is this tool?

This is a tool to let you add a text translation command to your YouTube/Twitch streams.

How does it work?

Behind the scenes, there is a server I have set up, which sends your text and the language to translate to, over to the Microsoft Azure translation services. Then it returns the translated text to you.

Cool! Can I see an example?

Of course! Here is a screenshot of the command used and the returned result! (Shown on Twitch as its easiest to test on Twitch while not live, but it works just fine on YouTube as well!)

Preview of translation in chat

That looks super cool! How do I use it?

There are a few steps to set this up. I have set it up to work this way so that I do not have to ask you all for donations to keep this running. The cost to me is very minimal and the cost to you as a consumer is either none at all, or pretty minimal if you have a lot of use of this tool!


Setup Directions

Step 1

Navigate to the following URL: https://rapidapi.com/microsoft-azure-org-microsoft-cognitive-services/api/microsoft-translator-text/

Signup
Plans
Step 2: Click the sign up button in the top right corner.
Step 3: Click “Pricing” shown here, and then there are 4 tiers. The first one is the free tier, you are limited to 500,000 translated characters a month (should be enough for most small channels).
There will be a “Subscribe” button under the “Basic” plan. Click that.

Step 4

Click the “Endpoints” link
Step 5: Click on the “Translate” endpoint on the left
Step 6: Now in the “Code snippets” section on the far right, you will see “‘x-rapidapi-key”. (It is in the place where i have a red box filled in so you cant see mine.) Copy the value from the other side of that. It should be a bunch of gibberish-looking letters and numbers. (Do not copy the quotations around it)

Step 7

Open your bot of choice (I only currently have a command written for Nightbot, but the command should be able to be adapted pretty easily for other bots)

Step 8

Create a custom command and in the message body, put the following command:

--- Command start, do not copy this line ---
Translated: $(urlfetch https://ccgaming-translator.herokuapp.com/translate/your-key-here/$(1)/$(querystring))
--- Command end, do not copy this line ---

Replace “your-key-here” with the key you saved in step 6.

Thats it! Save your command and you can now use it to translate in your chat!

Command Usage

In your chat, if you named your command “!translate” for instance, you just do this:

!translate en Text to translate here
!translate This is the command name
“en” is the language to translate TO (A list of the language codes can be found on googl -- you must use the 2 letter, code listed in the “639-1” column)
The third part is the text, whatever text you want can go here and it will return the translated version.

Contact Me

Please contact me on Twitter @cryancaire or via the form linked below to help me with feedback or bug reports.

Feedback Form

Latest Posts

  • JavaScript Array Sorting
  • JavaScript Password Generator
  • Simple JavaScript Counter
  • Web Development Tutorials Chrome Extension
  • Creating a Google Chrome Extension

Github

  • Profile
  • Translator API Repo
  • Google Chrome Extension Repo
  • Text Field Auto Complete Repo
  • Live Tweets Repo
  • Javascript Modal Repo
© 2023 CC Dev | Powered by Minimalist Blog WordPress Theme