[#1563] Return default if no matching locale found (#1576)

This commit is contained in:
Constantin Piber
2025-08-08 04:35:19 +03:00
committed by GitHub
parent 664d5fe637
commit a2622fe3e1
@@ -39,7 +39,7 @@ object LocalizationHelper {
return if (headerLang == null || headerLang.isEmpty()) {
Locale.getDefault()
} else {
Locale.lookup(Locale.LanguageRange.parse(headerLang), supportedLocales)
Locale.lookup(Locale.LanguageRange.parse(headerLang), supportedLocales) ?: Locale.getDefault()
}
}
}