Translated

class Translated(val key: String, arguments: List<UiTextArgument> = emptyList(), val fallback: TranslationFallback = TranslationFallback.UseKey) : UiText(source)

A translation key with typed arguments and a non-null fallback policy.

The argument list is defensively snapshotted. The TranslationFallback.UseKey fallback preserves and displays the key when lookup is unavailable.

Constructors

Link copied to clipboard
constructor(key: String, arguments: List<UiTextArgument> = emptyList(), fallback: TranslationFallback = TranslationFallback.UseKey)
constructor(key: String, fallback: String)

Creates a translation with a literal fallback.

constructor(key: String, arguments: List<UiTextArgument>, fallback: String)

Creates a translation with typed arguments and a literal fallback.

Properties

Link copied to clipboard

immutable typed translation arguments.

Link copied to clipboard

the typed fallback policy.

Link copied to clipboard
val key: String

the non-blank translation key.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Retains this text with a resource-pack font identifier without loading resources or changing its content.