Since Official deepl-java project is released, this unofficial project is archived.
DeepL API v2 client library for Java. Client library classes are auto generated by OpenAPI generator based on an unofficial DeepL OpenAPI specification.
DeepL4J is not yet published to Maven Central. Please use JitPack snapshot repository instead.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.sharplab</groupId>
<artifactId>deepl4j</artifactId>
<version>0.1.0.RELEASE</version>
</dependency>
DeepL4J uses a Gradle based build system.
In the instructions below, gradlew
is invoked from the root of the source tree and serves as a cross-platform,
self-contained bootstrap mechanism for the build.
- Java8 or later
git clone https://github.com/sharplab/deepl4j
./gradlew build
DeepLApi deepLApi = new DeepLApiFactory().create("<your api key>");
try {
Translations response = deepLApi.translate(
Collections.singletonList("This is a pen."),
"JA",
null, //null to detect source_lang
null,
null,
null,
null,
null,
null,
null,
null,
null
);
} catch (ApiException e) {
// error handling
}
DeepL4J is Open Source software released under the Apache 2.0 license.
Interested in helping out with DeepL4J? Great! Your participation in the community is much appreciated! Please feel free to open issues and send pull-requests.