get back translations with android and java resources packages

This commit is contained in:
2023-12-12 21:41:09 +06:00
parent 0d01561476
commit 3bf6896296
2 changed files with 6 additions and 0 deletions

View File

@@ -6,3 +6,5 @@ import java.util.Locale
fun StringResource.translation(locale: Locale): String {
return translation(locale.toIetfLanguageCode())
}
fun Locale.translation(resource: StringResource): String = resource.translation(this)