Victor Kropp

Kotlin Gettext

maven license

Gettext is a widely used internationalization (i18n) format supported by many tools. This project provides pure Kotlin implementation of Gettext.

Load translated strings and apply translations using an instance of I18n class.

val po = Thread.currentThread().contextClassLoader.getResourceAsStream("de.po")!!
val i18n = Gettext.load(Locale.GERMAN, po)
println(i18n.tr("Hello world!"))

Source code is on GitHub, contributions are welcome!

kotlini18n