Giter Club home page Giter Club logo

lb-vue2i18n's Introduction

lb-vue2i18n README

提取.vue 文件中的中文,并把他转成 i18n 变量,将提取后的语言合并到语言包 {rootProject}/lang/zh-CN.json

通过 diff 命令可以比对 {rootProject}/lang/zh-CN.json 比 {rootProject}/lang/en.json 新增了哪些词条

demo

下载项目多语言文件,支持 loco 翻译平台指定 project 下载到当前项目 可以在项目根目录的 package.json 中设置

"lbVue2i18n": {
  "locoExportKey": "xxxx", // 对应 loco 上的项目 api key
  "langPath": "src/lang", // 默认 /lang
  "vueType": "vue3" //是 vue3 还是 vue2, 默认 vue2,决定了输出到 vue 文件的是 this.$t or t,vue3 大概率写在 setup 中不要加 this, 且不能加 $,vue3 $ 只能加载vue自己的内部变量上
}

新增提取 js 文件内的中文

lb-vue2i18n's People

Contributors

bayun2 avatar

Watchers

James Cloos 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.