Translatable
Classes that implement Translatable can be automatically utilized by many FzzyConfig systems for generating translatable text in-game
Author
fzzyhmstrs
Since
0.2.0, added prefixes 0.6.0
Samples
import me.fzzyhmstrs.fzzy_config.util.Translatable
fun main() {
//sampleStart
class ExampleTranslatable: Translatable {
override fun translationKey(): String {
return "my.config.cool.translation"
}
override fun descriptionKey(): String {
return "my.config.cool.translation.desc"
}
}
//sampleEnd
}
Inheritors
Types
A translation result from a Translatable instance. This is generated internally, but is passed into many builder methods for config GUIs. Think of it, as the name implies, as the result of Fzzy Config generating a translation set for the relevant element.
Functions
The translated Text description from the descriptionKey. Falls back to an empty string so no tooltip is rendered.
translation key of this Translatable's description. the "description" in-game, the descriptions Enchantment Descriptions adds to enchantment tooltips are a good example.
Whether this Translatable has a valid description
Whether this Translatable has a valid translation
The translated Text description from the descriptionKey. Falls back to an empty string so no tooltip is rendered.
The translated Text name from the translationKey. Falls back to the implementing classes Simple Name (non-translated)
translation key of this Translatable. the "name" in-game