Skip to content

kalasaceo/varietyapi

Repository files navigation

TranslateAPI

Simple Java library to translate your text using Google Translate without using of API KEY

Screenshot

alt text

Download

  • Step 1. Add it in your root build.gradle at the end of repositories:
    allprojects {
        repositories {
          ...
          maven { url 'https://jitpack.io' }
        }
    }
  • Step 2. Add the dependency
   dependencies {
	        implementation 'com.github.iammannan:TranslateAPI:1.1'
	}
  • Full Code - Example
  	TranslateAPI translateAPI = new TranslateAPI(
                      Language.AUTO_DETECT,   //Source Language
                      Language.TAMIL,         //Target Language
                      "Your Text");           //Query Text

              translateAPI.setTranslateListener(new TranslateAPI.TranslateListener() {
                  @Override
                  public void onSuccess(String translatedText) {
                      Log.d(TAG, "onSuccess: "+translatedText);
                      textView.setText(translatedText);
                  }

                  @Override
                  public void onFailure(String ErrorText) {
                      Log.d(TAG, "onFailure: "+ErrorText);
                  }
              });

alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages