add opportunity to use translation with default locale

This commit is contained in:
InsanusMokrassar 2023-12-12 23:45:22 +06:00
parent 151aa1863d
commit 4a454f3d67

View File

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