Package-level declarations

Everything involved in translating Translatables.

Everything involved in translating Translatables.

Everything involved in translating Translatables.

Types

Link copied to clipboard
abstract class ArgumentsSupportingTranslator(primaryLocale: Locale, fallbackLocales: List<Locale>) : Translator

Represents a Translator which supports TranslatableWithArgs.

Link copied to clipboard
data class Locale(val language: String, val script: String?, val country: String?, val variant: String?)

Represents a platform independent representation of a locale consisting of a language, a script, a country and a variant.

Link copied to clipboard

Responsible to decide in which order Locales should be processed.

Link copied to clipboard
interface LocaleProvider
Link copied to clipboard

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

Represents a TranslationSupplier which is based on properties-files which are structured per entity (enum, object or class) and Locale.

Link copied to clipboard

Represents a TranslationSupplier which is based on properties-files which are structured per Locale.

Link copied to clipboard

Something which is Translatable and provides a default representation by value.

Link copied to clipboard
interface Translatable

Something which is translatable, identified by id with a default representation given by getDefault.

Link copied to clipboard
data class TranslatableWithArgs(val translatable: Translatable, val arguments: List<Any>) : Translatable

A Translatable which contains placeholders for arguments.

Link copied to clipboard

A supplier of translations for Translatables for particular Locales.

Link copied to clipboard
interface Translator

Represents a translator of Translatables.

Link copied to clipboard
class Untranslatable(representation: String) : Translatable

Represents a Translatable which is not translatable but has only a fixed name which serves as getDefault.

Link copied to clipboard
class UsingDefaultTranslator(primaryLocale: Locale = getDefaultLocale()) : ArgumentsSupportingTranslator

This translator does not translate but uses Translatable.getDefault instead and uses getDefaultLocale as primaryLocale if not defined differently via constructor parameter.

Functions

Link copied to clipboard
expect fun getDefaultLocale(): Locale

Returns the default Locale which should be used if not defined otherwise.

actual fun getDefaultLocale(): Locale

Currently returns the locale for en_GB -- this might change in the future without notice.

Link copied to clipboard

Transforms this Locale into a java.util.Locale.