mirror of
https://github.com/kataras/iris.git
synced 2026-01-03 02:07:06 +00:00
see prev commit
This commit is contained in:
@@ -188,7 +188,11 @@ func (l MemoryLocalizer) GetLocale(index int) context.Locale {
|
||||
index = 0
|
||||
}
|
||||
|
||||
return l[index]
|
||||
if locale, ok := l[index]; ok {
|
||||
return locale
|
||||
}
|
||||
|
||||
return l[0]
|
||||
}
|
||||
|
||||
// SetDefault changes the default language based on the "index".
|
||||
|
||||
Reference in New Issue
Block a user