An easy to use translation / localization api written in Kotlin that can be used with Java and Kotlin

Overview

KTranslate

KTranslate is an easy to use TranslationAPI written in Kotlin, with currently 26 supported languages. It is very easy to use in Kotlin and Java projects via Jitpack.

Summary

OpenAI Translator

  • Uses OpenAI to translate strings to a target language.
  • Cost: ~$0.0003 per 1k characters
  • Time per translation: ~400ms
  • Highly variable accuracy
  • Requires an openai api key.

Kotlin:

val translator = OpenAITranslatorAPI(Language.GERMAN, Language.BRITISH_ENGLISH, "YOUR_API_KEY") //get your api key from open https://openai.com/api/
println(translator.translate("Hallo Welt")) // --> "Hello World"

Java:

OpenAITranslatorAPI translator = new OpenAITranslatorAPI(Language.GERMAN, Language.BRITISH_ENGLISH, "YOUR_API_KEY"); //get your api key from open https://openai.com/api/
System.out.println(translator.translate("Hallo Welt")); // --> "Hello World"

DeepL Pro Translator

  • Uses the DeepL API to translate strings to a target language.
  • Cost: 0.02€ per 1k characters
  • Time per translation: ~200ms
  • Most accurate
  • Requiures an DeepLPro api key.

Kotlin

val translator = DeepLProTranslatorAPI(Language.GERMAN, Language.BRITISH_ENGLISH, "YOUR_API_KEY") //get your api key from open https://https://www.deepl.com/de/pro-account/summary
println(translator.translate("Hallo Welt")) // --> "Hello World"

Java:

DeepLProTranslatorAPI translator = new DeepLProTranslatorAPI(Language.GERMAN, Language.BRITISH_ENGLISH, "YOUR_API_KEY"); //get your api key from open https://https://www.deepl.com/de/pro-account/summary
System.out.println(translator.translate("Hallo Welt")); // --> "Hello World"

DeepL Free Translator

  • The only completely free method to translate.
  • Cost: Completely free
  • Time per translation: ~1500ms
  • Usually accurate
  • Requires a copy of chromedriver.exe installed on your system.

Kotlin

val translator = DeepLFreeTranslatorAPI(Language.GERMAN, Language.BRITISH_ENGLISH, "path/to/your/chromedriver.exe")
println(translator.translate("Hallo Welt")) // --> "Hello World"

Java:

DeepLFreeTranslatorAPI translator = new DeepLFreeTranslatorAPI(Language.GERMAN, Language.BRITISH_ENGLISH, "path/to/your/chromedriver.exe");
System.out.println(translator.translate("Hallo Welt")); // --> "Hello World"

Languages Supported

At the moment there are 26 languages supported.

  • Bulgarian
  • Chinese
  • Danish
  • German
  • British English
  • American English
  • Estonian
  • Finnish
  • French
  • Greek
  • Italian
  • Japanese
  • Latvian
  • Lithuanian
  • Dutch
  • Polish
  • Portuguese
  • Brazilian Portuguese
  • Romanian
  • Russian
  • Swedish
  • Slovakian
  • Slovenian
  • Spanish
  • Czech
  • Hungarian
You might also like...
Use a jar executable to create a Drawable class to display a SVG on Android.
Use a jar executable to create a Drawable class to display a SVG on Android.

SVG2Drawable Use a jar executable to create a Drawable class to display a SVG on Android. This is a standalone library, not a Runtime Android library.

Annotation based simple API flavored with AOP to handle new Android runtime permission model

Let Annotation based simple API flavoured with AOP to handle new Android runtime permission model. If you check Google's Samples about the new permiss

Dynamic Delivery everywhere through a common API
Dynamic Delivery everywhere through a common API

A set of tools geared towards making Dynamic Delivery universally available, regardless of underlying App Store / distribution platform, while also providing a single unified Android client API and a streamlined developer experience.

A cli tool that helps signing and zip aligning single or multiple Android application packages (APKs) with either debug or provided release certificates. It supports v1, v2 and v3 Android signing scheme has an embedded debug keystore and auto verifies after signing. A multi platform image density converting tool converting single or batches of images to Android, iOS, Windows or CSS specific formats and density versions given the source scale factor or width/height in dp. It has a graphical and command line interface and supports many image types (svg, psd, 9-patch, etc.) aswell as some lossless compressors like pngcrush. Android Resource Manager application to manage and analysis your app resources with many features like image resize, Color, Dimens and code Analysis
Android Resource Manager application to manage and analysis your app resources with many features like image resize, Color, Dimens and code Analysis

Android Resource Manager application to manage and analysis your app resources with many features like image resize, Color, Dimens and code Analysis

Analytics Tools for Kotlin Multiplatform Mobile iOS and android
Analytics Tools for Kotlin Multiplatform Mobile iOS and android

Index Features Example Introduce Architecture Installation Configure Using Screen Mapper Initialization Implementation Delegate Parameters ATEventPara

Library that makes it possible to read, edit and write CSV files
Library that makes it possible to read, edit and write CSV files

AdaptiveTableLayout Welcome the new CSV Library AdaptiveTableLayout for Android by Cleveroad Pay your attention to our new library that makes it possi

Simple library to generate and view PDF in Android
Simple library to generate and view PDF in Android

PDFCreatorAndroid Simple library to generate and view PDF in Android A simple library to create and view PDF with zero dependency Or native code. Add

Owner
Felix Beinssen
Full Stack Developer since 2015
Felix Beinssen
A library which will save you a lot of time from writing the same intent creation code. it consist of many intent creation codes like Share, Contacts, Email and etc, which you can easily use.

Android-Intent-Library A library which will save you a lot of time from writing the same intent creation code. it consist of many intent creation code

Next 67 Aug 24, 2022
🍼Debug Bottle is an Android runtime debug / develop tools written using kotlin language.

???? 中文 / ???? 日本語 / ???? English ?? Debug Bottle An Android debug / develop tools written using Kotlin language. All the features in Debug bottle are

Yuriel Arlencloyn 846 Nov 14, 2022
Sweet Android libraries written in Kotlin

Kandy A Kotlin library set dedicated to Android platform which will make programming sweet again! Repository All modules are available on the jcenter.

Kwezal 19 Jul 18, 2021
A CLI client for Up Bank, written in Kotlin.

upperkt pronounced /ˈʌpəkʌt/ Uppercut your Up balance today! (It's a CLI client for Up - an Australian neobank, written in Kotlin) Installing Right no

Duale Siad 2 Dec 3, 2021
Java 7 features backported to Android 2.2+

Using Java 7 & 8 Features on Android Feeling like you're stuck in 2006 while developing apps and libraries for Android? Don't worry, you're not alone.

Wes Lanning 87 Nov 25, 2022
知乎 Android 团队使用的 Java 库静态代码检查工具,支持目录、.jar、.aar 格式,可通过配置文件添加检查策略

SimpleWalker 知乎 Android 团队使用的 Java 库静态代码检查工具,支持目录、.zip、.aar 格式,可通过配置文件添加检查策略。 主要用于检查 Android 应用的三方依赖是否有调用隐私接口。 使用方法 项目工程中 release/ 目录下是最新版本的可执行文件,help

zkw周柯文 87 Dec 20, 2022
A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools.

Maven Android SDK Deployer Original author including numerous fixes and changes: Manfred Moser [email protected] at simpligility technologies i

simpligility 1.4k Dec 27, 2022
A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools.

Maven Android SDK Deployer Original author including numerous fixes and changes: Manfred Moser [email protected] at simpligility technologies i

simpligility 1.4k Dec 27, 2022
Use an expanded notification as a makeshift Android log output console

NotificationLog Use an expanded notification as a makeshift Android log output console. https://vine.co/v/bFxhUAVjvrY The design goals of this project

Jeff Gilfelt 162 Nov 15, 2022