fix: use LANG prefix instead of full value
This commit is contained in:
@ -36,6 +36,10 @@ func LoadLocale() *gotext.Mo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
locale := os.Getenv("LANG")
|
locale := os.Getenv("LANG")
|
||||||
|
if lastUnderscore := strings.LastIndex(locale, "_"); lastUnderscore != -1 {
|
||||||
|
locale = locale[0:lastUnderscore]
|
||||||
|
}
|
||||||
|
|
||||||
if locale != "" {
|
if locale != "" {
|
||||||
if slices.Contains(linguas, locale) {
|
if slices.Contains(linguas, locale) {
|
||||||
Locale = locale
|
Locale = locale
|
||||||
|
Reference in New Issue
Block a user