5 Usage
5gi edited this page 2022-11-04 16:58:08 -04:00

<<< Return

DeepJ

Follow the instuctions on this page to add DeepJ to your project

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

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