Skip to content

Releases: barabum0/aiogram-translation

🎉 2.0.1

12 Dec 17:49
Compare
Choose a tag to compare

Update project to last pydantic and aiogram versions

1.3

12 Aug 13:08
Compare
Choose a tag to compare
1.3

Add custom extract language function

Example

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: 1.2.2...1.3

1.2.2

03 Aug 14:02
Compare
Choose a tag to compare

Added new way, how language linking can be set.

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

Full Changelog: 1.2.1...1.2.2

1.2.1

03 Aug 13:43
Compare
Choose a tag to compare

Nothing much, just moved to PyPI

Full Changelog: 1.01...1.2.1

1.1

25 Jun 17:57
Compare
Choose a tag to compare
1.1

Added:

  • Language linking

Fixed:

  • Recursion in get_default_language func

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