AWS, Cloud Computing

5 Mins Read

Translate Text to Different Languages using Amazon Translate- Part 1

TABLE OF CONTENT

1. Introduction to Amazon Translate
2. Use Cases of Amazon Translate
3. Languages Supported by Amazon Translate
4. Steps and Code to Translate the Data
5. Lambda Code for Translating the Text and Storing the Translated files in S3
6. Final Code
7. Conclusion
8. About CloudThat
9. FAQs

1. Introduction to Amazon Translate

Translating text at a large scale is a massive challenge for many organizations that want to make themselves understood globally. Many organizations want their businesses to grow and try to make the text available in multiple languages so that everyone can understand it. Amazon Translate is the solution if we wish to translate the text for our website, provide localized text for our software applications, or provide a real-time translation. Amazon Translate accepts the text into one language and converts it to text in different languages. Amazon Translate helps to Translate the text in a fast, precise, and secure way.

Amazon Translate is a neural machine translation service that delivers fast, high-quality, affordable and customized language translation. Neural machine translation is a form of automated language translation that uses in-depth learning models to deliver more accurate and natural sound translations than standard math and rule-based translation algorithms.

With Amazon Translate, you can create local content such as websites and apps for various users, easily translate significant texts for analysis, and effectively enable interaction between users.

2. Use Cases of Amazon Translate:

Enhance multilingual customer experience using Amazon Translate:

Allow language-independent processing using Amazon Translate and other AWS services:

3. Languages Supported by Amazon Translate

Amazon Translate does not charge you for translations in which the source language and target language are the same.

Amazon Translate supports translation between the following 75 languages: Afrikaans, Albanian, Amharic, Arabic, Marathi, Norwegian, Farsi (Persian), Pashto, Polish, Portuguese, Portuguese (Portugal), Punjabi, Romanian, Russian, Serbian, Sinhala, Slovak, Slovenian, Somali, Spanish, Spanish (Mexico), Swahili, Swedish, Filipino Tagalog, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese,  Armenian, Azerbaijani, Bengali, Bosnian, Bulgarian, Chinese (Simplified), Catalan, Chinese (Traditional), Croatian, Czech, Danish, Dari, Dutch, English, Estonian, Finnish, French, French (Canada), Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Irish, Italian, Japanese, Kannada, Kazakh, Korean, Latvian, Lithuanian, Macedonian, Malay, Malayalam, Maltese, Mongolian and Welsh.

4. Steps and Code to Translate the Data

This article will translate the data stored in a text file into different Languages. We will use S3 triggers that will make it possible to automate translation from start to end. Below is a detailed overview of what we will accomplish in this article.

Setting up a Trigger on S3

Click on the ‘Add Trigger’ option on the lambda, select ‘S3’ as a source, and select the Event Type as ‘PUT’. The prefix is the folder & suffix is the file type. We are considering only .txt files for the demo

Amazon Translate

5. Lambda Code for Translating the Text and Storing the Translated files in S3

6. Final Code

7. Conclusion

Now, if we upload a text file in our S3 bucket, our Lambda will be triggered and after execution of our lambda, we will be able to see a text file in our S3 bucket containing the text Translated from the Text File. This text can be used as per the business requirements for further processing depending on the use case.

In the next blog, we will be looking into Translating the SRT(SubRip Subtitle) files into different Languages using Amazon Translate. These SRT files are used to Provide the subtitles to the Video Files. Amazon Translate doesn’t support the SRT Files for Translation, So we will discuss the other approach to Translate the SRT files.

8. About CloudThat

CloudThat is also the official  Microsoft Gold Partner, AWS Advanced Consulting Partner, and Training partner helping people develop knowledge of the cloud and help their businesses aim for higher goals using best in industry cloud computing practices and expertise. We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.

Drop a query if you have any questions regarding Amazon Translate, use cases, and any other AWS service, I will get back to you quickly. To get started, go through our Expert Advisory page and Managed Services Package that is CloudThat’s offerings.

9. FAQs

  1. What are the different inputs which Amazon Translate supports?

Ans. Amazon Translate supports plain text input in UTF-8 format.

  1. What are the size limits on the Translate API?

Ans. Amazon Translate API calls are limited to 5,000 bytes per API call. Amazon Translate, an asynchronous Batch Translation service, accepts a batch of up to 5 GB in size per API call

  1. Does Amazon Translate provide automatic source language detection?

Ans. Yes, Amazon Translate does automatic source language detection using Amazon Comprehend behind the scenes if the source language is unknown.

  1. Are requests where the source language and the target language are the same, charged?

Ans. No, Requests are not charged if the source language equals the target language.

Voiced by Amazon Polly

WRITTEN BY Sanket Gaikwad

SHARE

Comments

  1. Hitesh

    May 27, 2022

    Reply

    Good article.

  2. Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!