https://github.com/airdwing/airx-i18n
AirX i18n Project for both FE and BE
https://github.com/airdwing/airx-i18n
fe i18n
Last synced: 9 days ago
JSON representation
AirX i18n Project for both FE and BE
- Host: GitHub
- URL: https://github.com/airdwing/airx-i18n
- Owner: AirDwing
- License: apache-2.0
- Created: 2018-01-11T01:16:19.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-26T07:08:35.000Z (over 7 years ago)
- Last Synced: 2025-03-19T00:29:46.694Z (7 months ago)
- Topics: fe, i18n
- Language: JavaScript
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# @airx/i18n
[](https://npmjs.org/package/@airx/i18n) [](https://npmjs.org/package/@airx/i18n) [](https://npmjs.org/package/@airx/i18n) [](https://codebeat.co/projects/github-com-airdwing-airx-i18n-master)
## 贡献指南
English Version: [Contributing Guide](./.github/CONTRIBUTING.md)
- `src` 目录下,各语言建立单独的文件夹,命名规则采用纯小写,短破折号`-`连接,如`zh-cn`
- 使用 [YAML](http://www.yaml.org/) 语言进行翻译维护
- 原则:
1. 根据专业术语分类或功能模块(如禁飞区`nofly`)进行区分汇总
2. 相同翻译单词(如 `org: 组织`)不重复出现
3. 日常用于翻译统一归放于`common`下p.s. 团队成员进行代码贡献维护时,请勿直接在`master`下进行修改,创建自己的分支进行提交。
## 安装及使用```bash
yarn add @airx/i18n
# or
npm i --save @airx/i18n
```示例:
```js
const Vue = require('vue');
const VueI18n = require('vue-i18n');
const { zhCN, enUS } = require('@airx/i18n');Vue.use(VueI18n);
const i18n = new VueI18n({
locale: 'zh-CN',
fallbackLocale: 'zh-CN',
messages: {
'en-US': enUS,
'zh-CN': zhCN
}
});module.exports = i18n;
```## LICENSE
[Apache-2.0](./LICENSE)