From 4c8c2a7845ecbf78312b4a9d0b7e36733974f478 Mon Sep 17 00:00:00 2001 From: Mannar Mannan Date: Fri, 17 Aug 2018 01:39:59 +0530 Subject: [PATCH] README.md --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..11bcfae --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# TranslateAPI +Simple Java library to translate your text using Google Translate without using of API KEY + +# Screenshot +![alt text](https://raw.githubusercontent.com/iammannan/TranslateAPI/master/demo2.png) + +# Download + +* Step 1. Add it in your root build.gradle at the end of repositories: +```java + allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } + } +``` +* Step 2. Add the dependency +```java + dependencies { + implementation 'com.github.iammannan:TranslateAPI:1.0' + } +``` + * Full Code - Example + ```java + 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](https://raw.githubusercontent.com/iammannan/TranslateAPI/master/demo1.png) +