Update resources.md

This commit is contained in:
InsanusMokrassar 2023-12-22 03:23:56 +06:00 committed by GitHub
parent cc49dca724
commit 7309fb1d20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ object Translations {
val someVariable = buildStringResource( val someVariable = buildStringResource(
"Sample default string" "Sample default string"
) { ) {
IetfLanguageCode.German variant lazy "Beispiel für eine Standardzeichenkette" IetfLang.German variant lazy "Beispiel für eine Standardzeichenkette"
} }
} }
``` ```
@ -18,9 +18,9 @@ object Translations {
In this case, you will be able to use it with next logic: In this case, you will be able to use it with next logic:
```kotlin ```kotlin
Translation.someVariable.translation(IetfLanguageCode.French) // "Sample default string" as default one Translation.someVariable.translation(IetfLang.French) // "Sample default string" as default one
Translation.someVariable.translation(IetfLanguageCode.German) // "Beispiel für eine Standardzeichenkette" as available variant Translation.someVariable.translation(IetfLang.German) // "Beispiel für eine Standardzeichenkette" as available variant
Translation.someVariable.translation(IetfLanguageCode.German.DE) // "Beispiel für eine Standardzeichenkette" as available parent variant Translation.someVariable.translation(IetfLang.German.DE) // "Beispiel für eine Standardzeichenkette" as available parent variant
``` ```
## Additional opportunities on Android platform ## Additional opportunities on Android platform