Skip to content

S1B41/google-translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

google-translate

Translate text in Android using Google Cloud Translation API

What is that?

Android Java class translates text using Google Cloud Translation API

How it works?

It takes three parameters, the text which will be translated, the source language and the target language. It performs the translation in background and returns a string with the result

Features

  • Translating text using Google Cloud Translation API
  • Only one short class thus Easy to use and understand

How to use it?

  • Clone the repository or download the class from src and put it somewhere in your project folder
  • Import the package
  • Create an object of the class
GoogleTranslate googleTranslate = new GoogleTranslate();
  • Perform the translation by invoking the execute method, but first save the result in a String:
String result = googleTranslate.execute("the text to be translated", "en", "de").get();
  • The second parameter is the source language, the third is the terget language
  • Do whatever you want with the result!

License

The Class is licensed under the GNU General Public License v3.0

About

Translate text in Android using Google Translate API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages