8000 GitHub - PJ-Finlay/libretranslate-java: Java api for translating texts
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PJ-Finlay/libretranslate-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LibreTranslate Java Restful Client

At some point, we had to translate the Java text, but we didn't find comfortable and understandable libraries, so I wrote my decision.

Add as depend:

| Gradle:

repositories {
    // other repositories
    maven {
        name = "clojars.org"
        url = uri("https://repo.clojars.org")
    }
}

dependencies {
    // oth
5E85
er depends
    implementation 'net.clojars.suuft:libretranslate-java:1.0.5'
}

| Maven:

Repository:

<repository>
    <id>clojars.org</id>
    <url>https://repo.clojars.org</url>
</repository>

Depend:

<dependency>
    <groupId>net.clojars.suuft</groupId>
    <artifactId>libretranslate-java</artifactId>
    <version>1.0.5</version>
</dependency>

Usage:

For example, we will translate the text from Russian to English and put it in the console:

System.out.println(Translator.translate(Language.RUSSIAN, Language.ENGLISH, "Для примера, переведем текст с русского на английский и выведем в консоль:"));

If you have LibreTranslate installed on your server, you can change the URL for requests. Example:

Translator.setUrlApi("https://libretranslate.de/translate");

About

Java api for translating texts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%
0