Aiogram-translation

Latest version: v2.0.1

Safety actively analyzes 681715 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

2.0.1

Update project to last pydantic and aiogram versions

1.3

Add custom extract language function

Example
python
async def force_ukrainian_language(user: User, bot: Bot) -> str:
force_list = [733876760]
if user.id in force_list:
return "uk" Set force ukrainian language for account with 733876760 id
else:
return user.language_code

translator = Translator(extract_language_function=force_ukrainian_language)


**Full Changelog**: https://github.com/barabum0/aiogram-translation/compare/1.2.2...1.3

1.2.2

Added new way, how language linking can be set.

`Language(linked_to_key="en")` -> `Language.link_to("en")` (old way still works)



**Full Changelog**: https://github.com/barabum0/aiogram-translation/compare/1.2.1...1.2.2

1.2.1

Nothing much, just moved to PyPI

**Full Changelog**: https://github.com/barabum0/aiogram-translation/compare/1.01...1.2.1

1.01

Added:
- Language linking


Fixed:
- Recursion in get_default_language func

**Full Changelog**: https://github.com/barabum0/aiogram-translation/commits/1.01

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.