{"id":18976298,"url":"https://github.com/aiogram/i18n","last_synced_at":"2026-03-08T01:25:52.849Z","repository":{"id":177105875,"uuid":"659949389","full_name":"aiogram/i18n","owner":"aiogram","description":"Translation tool for aiogram","archived":false,"fork":false,"pushed_at":"2026-03-04T07:04:51.000Z","size":329,"stargazers_count":44,"open_issues_count":3,"forks_count":7,"subscribers_count":4,"default_branch":"dev","last_synced_at":"2026-03-04T12:52:11.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aiogram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-28T23:24:01.000Z","updated_at":"2026-03-04T07:04:56.000Z","dependencies_parsed_at":"2023-08-09T03:00:36.458Z","dependency_job_id":"b171f73f-f801-42c1-b784-6f698026b72c","html_url":"https://github.com/aiogram/i18n","commit_stats":{"total_commits":156,"total_committers":6,"mean_commits":26.0,"dds":"0.33974358974358976","last_synced_commit":"cd35798806e4770c6470da1bd05468b94c111f89"},"previous_names":["rootshinobi/aiogram_i18n","aiogram/aiogram_i18n","aiogram/i18n"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aiogram/i18n","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiogram%2Fi18n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiogram%2Fi18n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiogram%2Fi18n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiogram%2Fi18n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aiogram","download_url":"https://codeload.github.com/aiogram/i18n/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiogram%2Fi18n/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30240896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"ssl_error","status_checked_at":"2026-03-08T00:55:48.608Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T15:23:30.902Z","updated_at":"2026-03-08T01:25:52.826Z","avatar_url":"https://github.com/aiogram.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aiogram_i18n\n\nInstallation:\n```pip install aiogram_i18n```\n\nTo use FluentCompileCore:\n```pip install fluent_compiler```\n\nTo use FluentRuntimeCore:\n```pip install fluent.runtime```\n\n```python\nimport asyncio\nfrom contextlib import suppress\nfrom logging import basicConfig, INFO\nfrom typing import Any\n\nfrom aiogram import Router, Dispatcher, Bot\nfrom aiogram.client.default import DefaultBotProperties\nfrom aiogram.enums import ParseMode\nfrom aiogram.filters import CommandStart\nfrom aiogram.types import Message\n\nfrom aiogram_i18n import I18nContext, LazyProxy, I18nMiddleware, LazyFilter\nfrom aiogram_i18n.cores.fluent_runtime_core import FluentRuntimeCore\nfrom aiogram_i18n.types import (\n    ReplyKeyboardMarkup, KeyboardButton\n    # you should import mutable objects from here if you want to use LazyProxy in them\n)\n\nrouter = Router(name=__name__)\nrkb = ReplyKeyboardMarkup(\n    keyboard=[\n        [KeyboardButton(text=LazyProxy(\"help\"))]  # or L.help()\n    ], resize_keyboard=True\n)\n\n\n@router.message(CommandStart())\nasync def cmd_start(message: Message, i18n: I18nContext) -\u003e Any:\n    name = message.from_user.mention_html()\n    return message.reply(\n        text=i18n.get(\"hello\", user=name),  # or i18n.hello(user=name)\n        reply_markup=rkb\n    )\n\n\n@router.message(LazyFilter(\"help\"))  # or LazyProxy(\"help\") or F.text == LazyProxy(\"help\")\nasync def cmd_help(message: Message) -\u003e Any:\n    return message.reply(text=\"-- \" + message.text + \" --\")\n\n\nasync def main() -\u003e None:\n    basicConfig(level=INFO)\n    bot = Bot(\"42:ABC\", default=DefaultBotProperties(parse_mode=ParseMode.HTML))\n    i18n_middleware = I18nMiddleware(\n        core=FluentRuntimeCore(\n            path=\"locales/{locale}/LC_MESSAGES\"\n        )\n    )\n\n    dp = Dispatcher()\n    dp.include_router(router)\n    i18n_middleware.setup(dispatcher=dp)\n\n    await dp.start_polling(bot)\n\n\nif __name__ == \"__main__\":\n    with suppress(KeyboardInterrupt):\n        asyncio.run(main())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiogram%2Fi18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiogram%2Fi18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiogram%2Fi18n/lists"}