StringResource

class StringResource(val default: String, val map: 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, map: Map<IetfLang, Lazy<String>>)

Types

Link copied to clipboard
class Builder(var default: String)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun translation(languageCode: IetfLang): String
Link copied to clipboard
fun StringResource.translation(locale: Locale = Locale.getDefault()): String