mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fixed issue with unused default locale
This commit is contained in:
parent
e6742e5f8d
commit
a1e9cf148c
1 changed files with 2 additions and 0 deletions
|
|
@ -135,6 +135,8 @@ class I18nMiddleware(BaseMiddleware):
|
|||
if locale:
|
||||
*_, data = args
|
||||
language = data['locale'] = locale.language
|
||||
if language not in self.locales.keys():
|
||||
return self.default
|
||||
return language
|
||||
return None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue