libretranslate-java
libretranslate-java copied to clipboard
Java api for translating texts
I test it as follows,but get 403 response,what parameters are missing Translator.setUrlApi("https://libretranslate.com/translate"); System.out.println(Translator.translate(Language.RUSSIAN, Language.CHINESE, "Для примера, переведем текст с русского на английский и выведем в консоль:")); Kind regards
Minor rewording
This relatively small change adds an alternative translate function, _translateDetect_, that returns more information about the detected language. While testing this, I also found out that clojars now requires a...
When invoked the Language.valueOf("code") method is thrown **java.lang.IllegalArgumentException: No enum constant net.suuft.libretranslate.Language.it at java.base/java.lang.Enum.valueOf(Enum.java:273) at net.suuft.libretranslate.Language.valueOf(Language.java:8)**

Please deploy the jar file to https://central.sonatype.com/ This is not so difficult to do and won't take many time. Additionally it may be great to deploy the new version to...
The Fedilab API doesn't allow unknown HTTP clients without User-Agent header. Fixes: #16
The Spark has a nice command line utility to test translator: https://github.com/igniterealtime/Spark/blob/cb972ae18cfd56b1814d929341c797827f73dfd9/plugins/translator/src/test/java/com/jivesoftware/spark/translator/TestTranslator.java We can copy the example it into this sources (and remove there).
I've tried different repos, methods to import into my workspace, nothing worked. Compiling it by myself isn't effective either. Just throws compilation errors all the time. Checking the website repo...
The LibreTranslate has an API endpoint to get list of supported languages https://docs.libretranslate.com/api/operations/languages/ It can be used to get languages to show on UI for a user in a drop...