Skip to content

Commit

Permalink
add opportunity to use translation with default locale
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanusMokrassar committed Dec 12, 2023
1 parent 151aa18 commit 4a454f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/src/jvmMain/kotlin/StringResourceLocaleGetter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down

0 comments on commit 4a454f3

Please sign in to comment.