commonMain.com.bselzer.gw2.v2.intl.translation.WvwObjectiveTranslator.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of v2-intl-jvm Show documentation
Show all versions of v2-intl-jvm Show documentation
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.wvw.objective.WvwObjective
import com.bselzer.ktx.function.collection.addTo
class WvwObjectiveTranslator : Translator {
override fun texts(model: WvwObjective): List = listOf(model.name)
override fun translations(default: WvwObjective, translated: WvwObjective, language: String) = buildList {
Translation(
default = default.name,
translated = translated.name,
language = language
).addTo(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy