toggle menu
micro_utils.dokka
0.22.3
android
common
js
jvm
switch theme
search in API
micro_utils.dokka
/
dev.inmo.micro_utils.strings
Package-level
declarations
Types
Functions
Types
String
Resource
Link copied to clipboard
@
Serializable
(
with
=
StringResource.Companion::class
)
data
class
StringResource
(
val
default
:
String
,
val
translations
:
Map
<
IetfLang
,
Lazy
<
String
>
>
)
Use this class as a type of your strings object fields. For example:
Functions
build
String
Resource
Link copied to clipboard
inline
fun
buildStringResource
(
default
:
String
,
builder
:
StringResource.Builder
.
(
)
->
Unit
=
{}
)
:
StringResource
translation
Link copied to clipboard
android
js
jvm
fun
Context
.
translation
(
resource
:
StringResource
)
:
String
fun
Configuration
.
translation
(
resource
:
StringResource
)
:
String
fun
Resources
.
translation
(
resource
:
StringResource
)
:
String
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
fun
Locale
.
translation
(
resource
:
StringResource
)
:
String