class PropertiesPerEntityAndLocaleTranslationSupplier : PropertiesBasedTranslationSupplier<String>
Represents an ITranslationSupplier which is based on properties-files which are structured per entity (enum, object or class) and Locale.
For instance, the translations for ch.tutteli.atrium.DescriptionAnyAssertion and the Locale de_CH are
stored in a properties file named DescriptionAnyAssertion_de_CH.properties in the folder /ch/tutteli/atrium/
(compatible with the behaviour of ResourceBundle - thus properties files should also use ISO-8859-1 as encoding).
An entry in such a file would look like as follows:
TO_BE = a translation for TO_BE
PropertiesPerEntityAndLocaleTranslationSupplier()
Represents an ITranslationSupplier which is based on properties-files which are structured per entity (enum, object or class) and Locale. |
fun get(translatable: ITranslatable, locale: Locale): String?
Returns the translation for the given translatable for the given locale or null if it does not have any. |