mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Resolve user locale by checking the Telegram language code as-is, then its Babel-normalized form, then the base language. This fixes lowercase regional codes such as pt-br failing to match available translations like pt_BR. Add tests covering region-code variants and fallback behavior, and update i18n documentation plus changelog notes.
1 line
No EOL
213 B
ReStructuredText
1 line
No EOL
213 B
ReStructuredText
Improved i18n locale detection in ``SimpleI18nMiddleware`` to support Telegram-style region codes such as ``pt-br`` by resolving first the raw code and then the normalized Babel-style code (for example ``pt_BR``). |