All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.bselzer.gw2.v2.intl.translation.ContinentTranslator.kt Maven / Gradle / Ivy

Go to download

Internalization support by mapping translations from Guild Wars 2 API models.

The newest version!
package com.bselzer.gw2.v2.intl.translation

import com.bselzer.gw2.v2.intl.model.Translation
import com.bselzer.gw2.v2.model.continent.Continent
import com.bselzer.ktx.function.collection.addTo

class ContinentTranslator : Translator {
    override fun texts(model: Continent): List = listOf(model.name)

    override fun translations(default: Continent, translated: Continent, language: String) = buildList {
        Translation(
            default = default.name,
            translated = translated.name,
            language = language
        ).addTo(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy