PropertiesBasedTranslationSupplier

A base class for properties based TranslationSuppliers which provides a loading and caching mechanism of properties files.

There is no way to purge the cache. This class is intended for a one run process where translations do not change in between.

It is compatible with Java's Properties - thus properties files should also use ISO-8859-1 as encoding.

Parameters

T

Translations are grouped by a certain aspect (for instance, by Locale). T defines the type of it.

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract fun get(translatable: Translatable, locale: Locale): String?

Returns the translation for the given translatable and the given locale or null if it does not have any translation.