Giter VIP home page Giter VIP logo

airx-i18n's Introduction

@airx/i18n

npm npm npm codebeat badge

贡献指南

English Version: Contributing Guide

  • src 目录下,各语言建立单独的文件夹,命名规则采用纯小写,短破折号-连接,如zh-cn
  • 使用 YAML 语言进行翻译维护
  • 原则:
    1. 根据专业术语分类或功能模块(如禁飞区nofly)进行区分汇总
    2. 相同翻译单词(如 org: 组织)不重复出现
    3. 日常用于翻译统一归放于common

p.s. 团队成员进行代码贡献维护时,请勿直接在master下进行修改,创建自己的分支进行提交。

安装及使用

yarn add @airx/i18n
# or
npm i --save @airx/i18n

示例:

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

airx-i18n's People

Contributors

solocao avatar willin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.