Google Cloud Translation API
Google’s Cloud Translation API allows you to translate text that’s in more than 100 languages. There are two ways to use the Translation API. From the main menu of the Google Cloud console, click on Translation (as shown in the following screenshot) or type Translation API
into the search bar (at the top of the page):
After clicking on the dashboard, you will be prompted to select one of three options:
- AutoML Translation
- Cloud Translation API
- Translation Hub
Since we are going to use curl
to send a request to the Translation API, we will need to generate an API key to pass in our request URL.
First, let’s define our text. Type TEXT=
and type any sentence. Remember that the space between words should not be left blank; instead, in each space, type %20
. In our example, we will type This is a demo documentation
, as shown here:
TEXT = "This%20is%20a%20demo%20documentation...