StringResource

@Serializable(with = StringResource.Companion::class)
data class StringResource(val default: String, val translations: Map<IetfLang, Lazy<String>>)(source)

Use this class as a type of your strings object fields. For example:

object Strings {
val someResource: StringResource
}

Use buildStringResource for useful creation of string resource

See also

Constructors

Link copied to clipboard
constructor(default: String, translations: Map<IetfLang, Lazy<String>>)

Types

Link copied to clipboard
class Builder(var default: String)
Link copied to clipboard
object Companion : KSerializer<StringResource>

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun translation(languageCode: IetfLang?): String
Link copied to clipboard