update dependencies and remove redundant usages of old IetfLanguageCode

This commit is contained in:
2023-12-21 23:25:36 +06:00
parent 48d3fe41f2
commit 1bd671685b
6 changed files with 22 additions and 17 deletions

View File

@@ -1,10 +1,10 @@
package dev.inmo.micro_utils.strings
import dev.inmo.micro_utils.language_codes.toIetfLanguageCode
import dev.inmo.micro_utils.language_codes.toIetfLang
import java.util.Locale
fun StringResource.translation(locale: Locale = Locale.getDefault()): String {
return translation(locale.toIetfLanguageCode())
return translation(locale.toIetfLang())
}
fun Locale.translation(resource: StringResource): String = resource.translation(this)