Skip to content

Latest commit

 

History

History
51 lines (44 loc) · 1.12 KB

README.md

File metadata and controls

51 lines (44 loc) · 1.12 KB

Simple Kotlin https://localise.biz/ API client

Build Status Apache License


All Translations are in Properties format and load once

What does it look like? (Code snippets)

Response from API

{
    "en": {
        "hello-world": "Hello",
        "world": "World",
        "my": {
            "another": "Another"
        }
    }
}

"en" in Map

hello-world = Hello
world = World
my.another = Another

How to use? (Code snippets)

val client = LocoClient("<API_KEY>")
val i18n = client.translations("en")
println(i18n.t("my.another"))

How to add?

Add https://jitpack.io/ repository

Maven

<dependency>
    <groupId>com.github.npwork</groupId>
    <artifactId>kotlin-localise</artifactId>
    <version>-SNAPSHOT</version>
</dependency>

Gradle

implementation 'com.github.npwork:kotlin-localise:-SNAPSHOT'