This project uses the Translation API in a servlet to translate text submitted by a user. It uses the fetch() function from JavaScript to request translations, creating a minimalist version of Google Translate.

Minimalist Google Translate

To run this example, first make sure your GOOGLE_APPLICATION_CREDENTIALS environment variable is set and that you’ve enabled the Translation API:

Then execute this command:

mvn clean package exec:java

Then navigate to http://localhost:8080/index.html

Learn more at