Package-level declarations

Types

Link copied to clipboard
data class Configuration(val defaultLanguage: String, val scriptingEnabled: Boolean, val globalConfig: GlobalConfig, val pluginConfig: PluginConfig, val sources: MutableMap<String, TranslationSource>)

Data class holding the configuration for Klarity.

Link copied to clipboard
data class GlobalConfig(val globalPrefix: String, val globalSuffix: String, val globalParameters: MutableMap<String, String>)

Data class holding the configuration for Klarity regarding globals.

Link copied to clipboard

Interface for middlewares. Middlewares are codes that can modify the output of Klarity.translate() after the script has been parsed. This could be useful to add custom parsing, for example adding color code support in Minecraft plugins.

Link copied to clipboard
data class PluginConfig(val middlewares: MutableList<KlarityMiddleware>, val functions: MutableMap<String, KlarityFunction>)

Data class holding the configuration for Klarity regarding its' customization.

Link copied to clipboard

Translation sources are responsible for retrieving the strings from whatever source. Additionally translation sources are expected to write defaultValues if the source does not include the key (only if possible by the format that is).

Functions

Link copied to clipboard