In this recipe, we will examine how to detect the language in use and how to translate text between languages using the Amazon Translate API. The process of translating is easy to use once an Amazon account has been set up. There is an AWS SDK for Java Version 1.0 and 2.X. We will be using the 2.X version. Support for the earlier version is being dropped.
Language detection and translation using Amazon AWS
Getting ready
To prepare, we need to follow these steps:
- Create a new Maven project
- Add the following dependencies to the POM file:
<!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-core -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core<...