Skip to content

Commit 4c8c2a7

Browse files
authored
README.md
1 parent 7634249 commit 4c8c2a7

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# TranslateAPI
2+
Simple Java library to translate your text using Google Translate without using of API KEY
3+
4+
# Screenshot
5+
![alt text](https://raw.githubusercontent.com/iammannan/TranslateAPI/master/demo2.png)
6+
7+
# Download
8+
9+
* Step 1. Add it in your root build.gradle at the end of repositories:
10+
```java
11+
allprojects {
12+
repositories {
13+
...
14+
maven { url 'https://jitpack.io' }
15+
}
16+
}
17+
```
18+
* Step 2. Add the dependency
19+
```java
20+
dependencies {
21+
implementation 'com.github.iammannan:TranslateAPI:1.0'
22+
}
23+
```
24+
* Full Code - Example
25+
```java
26+
TranslateAPI translateAPI = new TranslateAPI(
27+
Language.AUTO_DETECT, //Source Language
28+
Language.TAMIL, //Target Language
29+
"Your Text"); //Query Text
30+
31+
translateAPI.setTranslateListener(new TranslateAPI.TranslateListener() {
32+
@Override
33+
public void onSuccess(String translatedText) {
34+
Log.d(TAG, "onSuccess: "+translatedText);
35+
textView.setText(translatedText);
36+
}
37+
38+
@Override
39+
public void onFailure(String ErrorText) {
40+
Log.d(TAG, "onFailure: "+ErrorText);
41+
}
42+
});
43+
```
44+
![alt text](https://raw.githubusercontent.com/iammannan/TranslateAPI/master/demo1.png)
45+

0 commit comments

Comments
 (0)