# 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
    }

Content copied to clipboard

Use buildStringResource for useful creation of string resource

#### See also

buildStringResource

## Constructors

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

## Types

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

## Properties

default
Link copied to clipboard
val default : String
translations
Link copied to clipboard
val translations : Map < IetfLang , Lazy < String >>

## Functions

translation
Link copied to clipboard
fun translation (languageCode: IetfLang ?): String
translation
Link copied to clipboard
fun StringResource . translation (context: Context ): String
fun StringResource . translation (configuration: Configuration ): String
fun StringResource . translation (resources: Resources ): String
fun StringResource . translation (): String
fun StringResource . translation (language: NavigatorLanguage ): String
fun StringResource . translation (locale: Locale = Locale.getDefault()): String