forked from Steven/DeepJ
Update 'Usage'
parent
9be9d2838b
commit
147a2e4b22
34
Usage.md
34
Usage.md
@ -1 +1,33 @@
|
|||||||
Welcome to the Wiki.
|
# DeepJ
|
||||||
|
Follow the instuctions on this page to add DeepJ to your project
|
||||||
|
[](https://jitpack.io/#tech.nevets.git.5gi/DeepJ)
|
||||||
|
|
||||||
|
Create a new Translator:
|
||||||
|
|
||||||
|
```
|
||||||
|
Translator translator = new Translator(apiKey);
|
||||||
|
System.out.println(translator.translate(Translator.Language.Spanish, "Message to translate"));
|
||||||
|
```
|
||||||
|
|
||||||
|
this:
|
||||||
|
`translator.translate(Translator.Language.Spanish, "Message to translate");`
|
||||||
|
should return:
|
||||||
|
`Mensaje para traducir`
|
||||||
|
|
||||||
|
# Global Auth Keys
|
||||||
|
Follow the instuctions on this page to add DeepJ to your project
|
||||||
|
[](https://jitpack.io/#tech.nevets.git.5gi/DeepJ)
|
||||||
|
|
||||||
|
This sets the default auth key
|
||||||
|
`Translator.setGlobalAuthKey(apiKey)`
|
||||||
|
|
||||||
|
Create a new Translator:
|
||||||
|
```
|
||||||
|
Translator translator = new Translator();
|
||||||
|
System.out.println(translator.translate(Translator.Language.Spanish, "Message to translate"));
|
||||||
|
```
|
||||||
|
|
||||||
|
this:
|
||||||
|
`translator.translate(Translator.Language.Spanish, "Message to translate");`
|
||||||
|
should return:
|
||||||
|
`Mensaje para traducir`
|
||||||
|
Loading…
Reference in New Issue
Block a user