Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,12 @@ Be careful not to expose your key, for example when sharing source code.
import com.deepl.api.*;

class Example {
DeepLClient client;

public Example() throws Exception {
String authKey = "f63c02c5-f056-..."; // Replace with your key
client = new DeepLClient(authKey);
Translator translator = new Translator(authKey);

TextResult result =
client.translateText("Hello, world!", null, "fr");
translator.translateText("Hello, world!", null, "fr");
System.out.println(result.getText()); // "Bonjour, le monde !"
}
}
Expand Down