{"id":19987960,"url":"https://github.com/i18n-pro/vue2","last_synced_at":"2025-09-08T14:36:21.274Z","repository":{"id":193650279,"uuid":"600414329","full_name":"i18n-pro/vue2","owner":"i18n-pro","description":"Lightweight, simple, flexible, automatic translation internationalization tool for Vue 2（适用于 Vue 2 的轻量、简单、灵活、自动翻译的国际化工具）","archived":false,"fork":false,"pushed_at":"2023-09-09T06:25:10.000Z","size":281,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T13:43:27.934Z","etag":null,"topics":["auto-translation","automatic-translation","i18n","i18n-pro","machine-translation","translator","vue","vue-i18n","vue2"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/i18n-pro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-11T12:23:55.000Z","updated_at":"2024-06-02T05:50:13.000Z","dependencies_parsed_at":"2023-09-09T08:47:31.553Z","dependency_job_id":null,"html_url":"https://github.com/i18n-pro/vue2","commit_stats":null,"previous_names":["i18n-pro/vue2"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i18n-pro%2Fvue2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i18n-pro%2Fvue2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i18n-pro%2Fvue2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i18n-pro%2Fvue2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i18n-pro","download_url":"https://codeload.github.com/i18n-pro/vue2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241426172,"owners_count":19960986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["auto-translation","automatic-translation","i18n","i18n-pro","machine-translation","translator","vue","vue-i18n","vue2"],"created_at":"2024-11-13T04:40:08.138Z","updated_at":"2025-09-08T14:36:21.226Z","avatar_url":"https://github.com/i18n-pro.png","language":"TypeScript","funding_links":[],"categories":["Components \u0026 Libraries"],"sub_categories":["Utilities"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cp style=\"font-size: 18px;\"\u003eAn out-of-the-box, lightweight i18n auto-translation solution for Vue\u003c/p\u003e\n\nEnglish | [简体中文](https://github.com/i18n-pro/vue2/blob/v2.0.0/README_zh-CN.md)\n\n\n\n[![npm-version](https://img.shields.io/npm/v/@i18n-pro/vue2.svg?style=flat-square \"npm-version\")](https://www.npmjs.com/package/@i18n-pro/vue2 \"npm\")\n[![npm-download](https://img.shields.io/npm/dm/@i18n-pro/vue2 \"npm-download\")](https://www.npmjs.com/package/@i18n-pro/vue2 \"npm\")\n\n[![github-stars](https://img.shields.io/github/stars/i18n-pro/vue2?style=social \"github-stars\")](https://github.com/i18n-pro/vue2/stargazers \"github-stars\")\n[![last-commit](https://img.shields.io/github/last-commit/i18n-pro/vue2/main \"last-commit\")](https://github.com/i18n-pro/vue2/commits/main \"last-commit\")\n[![github-issues](https://img.shields.io/github/issues-raw/i18n-pro/vue2 \"github-issues\")](https://github.com/i18n-pro/vue2/issues \"github-issues\")\n[![codecov](https://codecov.io/gh/i18n-pro/vue2/branch/main/graph/badge.svg?token=B9R4W0F1XI \"codecov\")](https://codecov.io/gh/i18n-pro/vue2 \"codecov\")\n\n![demo](https://s3.bmp.ovh/imgs/2025/07/11/f76e2e57b5a248af.gif)\n\n\u003c/div\u003e\n\u003cdetails \u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n\n  [Vision](#vision)\u003cbr/\u003e\n  [Requirement](#requirement)\u003cbr/\u003e\n  [Features](#features)\u003cbr/\u003e\n  [Live Demo](#live-demo)\u003cbr/\u003e\n  [Principle](#principle)\u003cbr/\u003e\n  [License](#license)\u003cbr/\u003e\n\n\u003c/details\u003e\n\n\n# Vision\nMake internationalization easy and enjoyable 😄💪🏻\n\n# Requirement\n\n\u003e The current library is only applicable to  `Vue 2` . If you need to support  `Vue 3` , please click  [i18n-pro/vue](https://github.com/i18n-pro/vue)  to view\u003cbr/\u003e\n* vue \u003e= **2.0.0** \u003c **3.0.0**\n* i18n-pro \u003e= **3.0.0** \u003c **4.0.0**\n\n\n# Features\n\n* **lightweight**：[![bundlesize](https://img.shields.io/bundlephobia/minzip/i18n-pro?color=brightgreen\u0026style=plastic \"i18n-pro-bundlesize\")](https://bundlephobia.com/package/i18n-pro \"i18n-pro-bundlesize\") + [![bundlesize](https://img.shields.io/bundlephobia/minzip/@i18n-pro/vue2?color=brightgreen\u0026style=plastic \"bundlesize\")](https://bundlephobia.com/package/@i18n-pro/vue2 \"bundlesize\")\n* The following features are inherited from  [i18n-pro](https://github.com/i18n-pro/core \"i18n-pro\") \n   * **simple**\n   * **flexible**\n   * **automatic-translation**\n   * **keyless**\n\n\n# Live Demo\n\n* with$ = true\n   * [Open in CodeSandbox](https://codesandbox.io/p/github/i18n-pro/vue2-demo/main?file=README.md)\n   * [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz_small.svg \"Open in StackBlitz\")](https://stackblitz.com/github/i18n-pro/vue2-demo/tree/main?file=README.md)\n* with$ = false\n   * [Open in CodeSandbox](https://codesandbox.io/p/github/i18n-pro/vue2-demo/simple?file=README.md)\n   * [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz_small.svg \"Open in StackBlitz\")](https://stackblitz.com/github/i18n-pro/vue2-demo/tree/simple?file=README.md)\n\n\n# Principle\nThis library is implemented based on  [i18n-pro](https://github.com/i18n-pro/core \"i18n-pro\")  combined with  `Vue` 's  `Prototype Properties, Reactivity System and Plugin System` \n\nMainly composed of  `1`  parts\n* createI18n\n\n\n\n**createI18n**：Initialize internationalization state and return its plugin function\n\n\n\nA simple example is as follows\n```jsx\n// App.vue\n\u003ctemplate\u003e\n  {/** text-as-key */}\n  \u003cdiv\u003e{{ $t('hello world') }}\u003c/div\u003e\n  {/** custom-key */}\n  \u003cdiv\u003e{{ $t.t('custom-key', 'hello world') }}\u003c/div\u003e\n\u003c/template\u003e\n\n// main.ts\nimport Vue from 'vue'\nimport App from './App.vue'\nimport { createI18n } from '@i18n-pro/vue2'\n\nconst i18n = createI18n({\n  namespace: \"i18n-example\",\n  locale: \"en\",\n  langs: {\n    zh: {\n      'hello world': '你好世界',\n      'custom-key': '你好世界',\n    },\n    ja:{\n      \"hello world\": \"こんにちは世界\",\n      'custom-key': 'こんにちは世界',\n    },\n  }\n})\n\nVue.use(i18n)\n\nnew Vue({\n  el: '#app',\n  render: h =\u003e h(App)\n})\n```\n\n# Help Document\n\n\u003e To avoid unnecessary duplicate document content, some of the documents in this library are linked to the content in  `i18n-pro` \u003cbr/\u003e\n\u003e The  `i18n-pro`  related link in the current document is based on the  `3.0.0`  version. If you are using a different version, you need to check the document corresponding to the version you are using to avoid inconsistent usage\u003cbr/\u003e\n* Current Library\n   * [Quick Start](https://github.com/i18n-pro/vue2/blob/v2.0.0/docs/dist/USAGE.md)\n   * [API](https://github.com/i18n-pro/vue2/blob/v2.0.0/docs/dist/API.md)\n   * [Changelog](https://github.com/i18n-pro/vue2/blob/v2.0.0/docs/dist/CHANGELOG.md)\n* i18n-pro\n   * [Command Line](https://github.com/i18n-pro/core/blob/v3.0.0/docs/dist/COMMAND_LINE.md)\n   * [Matching Rules](https://github.com/i18n-pro/core/blob/v3.0.0/docs/dist/MATCH_RULE.md)\n   * [Q\u0026A](https://github.com/i18n-pro/core/blob/v3.0.0/docs/dist/Q\u0026A.md)\n   * [Translation Log](https://github.com/i18n-pro/core/blob/v3.0.0/docs/dist/OUTPUT_LOG.md)\n\n\n# License\n[MIT](./LICENSE)\n\nCopyright (c) 2023-present Eyelly Wu","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi18n-pro%2Fvue2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi18n-pro%2Fvue2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi18n-pro%2Fvue2/lists"}