gradle-josm-plugin / org.openstreetmap.josm.gradle.plugin.i18n.io / LangReader

LangReader

class LangReader

A reader class for reading the custom *.lang file format of JOSM.

Constructors

<init>

LangReader()

A reader class for reading the custom *.lang file format of JOSM.

Functions

readBaseLangStream

fun readBaseLangStream(stream: InputStream): List<MsgId>

Reads the strings of the base language from the input stream.

readLangFiles

fun readLangFiles(langFileDir: File, baseLang: String): Map<String, Map<MsgId, MsgStr>>

Reads all *.lang files in a directory into a map from the name of each language to a map that associates the string in the base language with the string translated to the current language.

readLangStreams

fun readLangStreams(baseLang: String, baseStream: InputStream, langStreams: Map<String, InputStream>): Map<String, Map<MsgId, MsgStr>>

Read translations from *.lang files available as InputStreams