doc / ch.tutteli.atrium.reporting.translating

Package ch.tutteli.atrium.reporting.translating

Everything involved in translating Translatables.

Types

ArgumentsSupportingTranslator

abstract class ArgumentsSupportingTranslator : Translator

Represents a Translator which supports TranslatableWithArgs.

Locale

data class Locale

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

LocaleOrderDecider

interface LocaleOrderDecider

Responsible to decide in which order Locales should be processed.

StringBasedTranslatable

interface StringBasedTranslatable : Translatable

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

Translatable

interface Translatable

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

TranslatableBasedRawString

data class TranslatableBasedRawString : RawString

Use this class to represent a Translatable which shall be translated and then be treated as raw String in reporting.

TranslatableWithArgs

data class TranslatableWithArgs : Translatable

A Translatable which contains placeholders for arguments.

TranslationSupplier

interface TranslationSupplier

A supplier of translations for Translatables for particular Locales.

Translator

interface Translator

Represents a translator of Translatables.

Untranslatable

class Untranslatable : Translatable

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

UsingDefaultTranslator

class UsingDefaultTranslator : ArgumentsSupportingTranslator

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

Functions

getDefaultLocale

expect fun getDefaultLocale(): Locale

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

toJavaLocale

fun Locale.toJavaLocale(): Locale

Transforms this Locale into a java.util.Locale.