{"id":51099150,"url":"https://github.com/efureev/fint-i18n","last_synced_at":"2026-06-24T09:03:35.714Z","repository":{"id":349837922,"uuid":"1204085931","full_name":"efureev/fint-i18n","owner":"efureev","description":"Localization library for Vue 3 with lazy-loading blocks, template compilation, and extensible plugins.","archived":false,"fork":false,"pushed_at":"2026-04-28T07:20:54.000Z","size":133,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-28T09:12:05.428Z","etag":null,"topics":["i18n","lazy-loading","localization","translation","vue3"],"latest_commit_sha":null,"homepage":"https://efureev.github.io/fint-i18n/","language":"TypeScript","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/efureev.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":"2026-04-07T17:16:36.000Z","updated_at":"2026-04-28T07:19:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/efureev/fint-i18n","commit_stats":null,"previous_names":["efureev/fint-i18n"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/efureev/fint-i18n","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Ffint-i18n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Ffint-i18n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Ffint-i18n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Ffint-i18n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efureev","download_url":"https://codeload.github.com/efureev/fint-i18n/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efureev%2Ffint-i18n/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34724745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["i18n","lazy-loading","localization","translation","vue3"],"created_at":"2026-06-24T09:03:34.993Z","updated_at":"2026-06-24T09:03:35.709Z","avatar_url":"https://github.com/efureev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @feugene/fint-i18n\n\n[![codecov](https://codecov.io/gh/efureev/fint-i18n/branch/main/graph/badge.svg)](https://codecov.io/gh/efureev/fint-i18n)\n[![npm version](https://badge.fury.io/js/@feugene%2Ffint-i18n.svg)](https://badge.fury.io/js/@feugene%2Ffint-i18n)\n[![bundle size](https://badgen.net/bundlephobia/minzip/@feugene/fint-i18n)](https://bundlephobia.com/package/@feugene/fint-i18n)\n[![dependency count](https://badgen.net/bundlephobia/dependency-count/@feugene/fint-i18n)](https://bundlephobia.com/package/@feugene/fint-i18n)\n\n\n[Русская версия (Russian version)](./README.ru.md)\n\nLocalization library for Vue 3 with lazy-loading blocks, template compilation, and extensible plugins.\n\n## Features\n\n- **Small surface area**: The package is split into `core`, `vue`, and `plugins` entry points.\n- **Performant runtime**: Templates are compiled into functions and cached.\n- **Async blocks**: Support for splitting translations into blocks and lazy-loading them.\n- **Bridge Mode**: Transparent integration with `vue-i18n`.\n- **Plugins**: Hook system for extending functionality (persistence, logging, etc.).\n- **Simple runtime contract**: The only peer dependency is `vue`.\n\n## Documentation\n\nYou can find detailed information about the library in the relevant sections:\n\n- 📦 **[Installation and Getting Started](./docs/en/installation.md)**: How to install the package and configure it in a Vue application.\n- 📂 **[Defining Messages](./docs/en/defining-messages.md)**: JSON formats, loaders, and dynamic merging.\n- 🌐 **[Authoring localization packages](./docs/en/authoring-localization-packages.md)**: Per-locale export contract for tree-shakable donor packages.\n- 🚀 **[Usage](./docs/en/usage.md)**: How to use `t()`, `$t`, and the `v-t` directive.\n- 📘 **[API Reference](./docs/en/api.md)**: Detailed description of all functions, methods, and composables.\n- 🔌 **[Plugins](./docs/en/plugins.md)**: Extending functionality via the hook system and built-in plugins.\n- 🧱 **[Translation Blocks](./docs/en/blocks.md)**: Deep dive into the concept of blocks and memory management.\n- ⚡ **[Benchmarks and Bundle Analysis](./docs/en/bundle-analysis.md)**: How to measure the hot path and analyze the `dist` composition.\n\n---\n\n## Quick Start\n\n### 1. Initialization\n\n```typescript\nimport { createApp } from 'vue'\nimport { createFintI18n } from '@feugene/fint-i18n/core'\nimport { installI18n } from '@feugene/fint-i18n/vue'\nimport { en as appEn, ru as appRu } from './i18n/messages'\nimport { en as granularityEn, ru as granularityRu } from '@feugene/granularity/i18n'\nconst i18n = createFintI18n({\n  locale: 'en',\n  fallbackLocale: 'en',\n  // Import only the locales the application actually ships — bundlers will\n  // tree-shake the rest out of the final build.\n  loaders: [appEn, appRu, granularityEn, granularityRu],\n})\n\nconst app = createApp(App)\ninstallI18n(app, i18n)\napp.mount('#app')\n```\n\n`loaders` accepts:\n\n- `LocaleLoaderCollection` — a single locale/block collection;\n- `LocaleLoaderCollection[]` — an array of collections from multiple packages;\n- for each `block`, you can pass a single loader or an array of loaders.\n\nRules:\n\n- collections in `loaders: [...]` are merged **from left to right**;\n- if the same `block` is found in multiple collections, loaders are combined into an array;\n- loaders for a single block are executed **sequentially**;\n- in case of key conflicts in messages, the **last** loader wins;\n- when `loadBlock('pages.articles')` is called, it first looks for an exact block match, then the nearest parent block (`pages`).\n\n### 2. Usage in components\n\n```vue\n\u003cscript setup\u003e\nimport { useFintI18n, useI18nScope } from '@feugene/fint-i18n/vue'\n\n// Connect necessary blocks (they will load automatically)\nawait useI18nScope(['common', 'auth'])\n\nconst { t, locale, setLocale } = useFintI18n()\n\nconst changeLanguage = async () =\u003e {\n  await setLocale(locale.value === 'en' ? 'ru' : 'en')\n}\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003cp\u003e{{ t('common.welcome', { name: 'User' }) }}\u003c/p\u003e\n    \u003cbutton @click=\"changeLanguage\"\u003e\n      Change Language\n    \u003c/button\u003e\n    \n    \u003c!-- Directive usage --\u003e\n    \u003cspan v-t=\"'auth.login'\" /\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefureev%2Ffint-i18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefureev%2Ffint-i18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefureev%2Ffint-i18n/lists"}