# eps-i18n

> vueautoi18n

Latest version **1.0.0** (published 2021-10-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install eps-i18n
pnpm add eps-i18n
yarn add eps-i18n
bun add eps-i18n
```

Provides the command `eps-i18n`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-10-09 |
| First published | 2021-10-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 22 |
| Unpacked size | 51.1 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | 康俊鹏 |
| Maintainers | junpengkang |

## Links

- npm: https://www.npmjs.com/package/eps-i18n
- npm.io page: https://npm.io/package/eps-i18n

## Dependencies (22)

- [glob](https://npm.io/package/glob.md) ^7.1.7
- [axios](https://npm.io/package/axios.md) ^0.21.4
- [chalk](https://npm.io/package/chalk.md) ^4.1.1
- [inquirer](https://npm.io/package/inquirer.md) ^8.1.1
- [prettier](https://npm.io/package/prettier.md) ^2.3.2
- [commander](https://npm.io/package/commander.md) ^8.0.0
- [crypto-js](https://npm.io/package/crypto-js.md) ^4.1.1
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.14.8
- [@babel/types](https://npm.io/package/@babel/types.md) ^7.14.8
- [@babel/traverse](https://npm.io/package/@babel/traverse.md) ^7.14.8
- [@babel/generator](https://npm.io/package/@babel/generator.md) ^7.14.8
- [@babel/plugin-syntax-jsx](https://npm.io/package/@babel/plugin-syntax-jsx.md) ^7.14.5
- [@babel/preset-typescript](https://npm.io/package/@babel/preset-typescript.md) ^7.14.5
- [@babel/plugin-syntax-decorators](https://npm.io/package/@babel/plugin-syntax-decorators.md) ^7.14.5
- [@babel/plugin-syntax-function-bind](https://npm.io/package/@babel/plugin-syntax-function-bind.md) ^7.14.5
- [@babel/plugin-syntax-do-expressions](https://npm.io/package/@babel/plugin-syntax-do-expressions.md) ^7.14.5
- [@babel/plugin-syntax-dynamic-import](https://npm.io/package/@babel/plugin-syntax-dynamic-import.md) ^7.8.3
- [@babel/plugin-syntax-async-generators](https://npm.io/package/@babel/plugin-syntax-async-generators.md) ^7.8.4
- [@babel/plugin-syntax-class-properties](https://npm.io/package/@babel/plugin-syntax-class-properties.md) ^7.12.13
- [@babel/plugin-syntax-export-extensions](https://npm.io/package/@babel/plugin-syntax-export-extensions.md) ^7.0.0-beta.32
- [@babel/plugin-syntax-object-rest-spread](https://npm.io/package/@babel/plugin-syntax-object-rest-spread.md) ^7.8.3
- [@babel/plugin-proposal-optional-chaining](https://npm.io/package/@babel/plugin-proposal-optional-chaining.md) ^7.14.5

## Recent versions

- 1.0.0 (latest) — 2021-10-09

## README

# eps-i18n

## 安装
```
npm i -D eps-i18n
```

## 配置webpack loader 
```js
module.exports = {
  // ... 其他配置
  module:{
    rules:[
      {
          enforce: 'pre', // 此项一定要加上 优先执行的loader
          test: /\.(js|vue)$/,
          use: [
            {
              loader: 'eps-i18n'
            }
          ],
          exclude: /node_modules/
        }
    ]
  }
}
```

## 配置eps-i18n
```js
module.exports = {
  language: ['zh', 'en'],                                                         // 需要国际化的语言种类
  exclude: [],                                                                    // 需要忽略文件
  i18nInstance: "import i18n from '@/geely-i18n/index'",                          // 国际化资源入口
  // localePath: './src/locales/lang',                                            // 国际化资源输出路径  默认 './src/locales/lang'
  // i18nInstance: "import i18n from '@/vuei18n'",                                // 国际化要注入到js里面的实例 会在js文件第一行注入
  // setMessageKey: false,                                                        // 自定义key 默认根据汉字md5  支持函数 有两个回调参数 function(key, value) {}
  // // 有appid && secret 是由百度翻译 没有则默认全部生成为中文
  // appid: "",                                                                   // 百度翻译appid  去百度开发者平台查看 http://api.fanyi.baidu.com/doc/21
  // secret: "",                                                                  // 百度翻译密钥
}
```

### cli
```shell
npx eps-i18n sync # 同步国际化资源文件
```

---
_Source: https://npm.io/package/eps-i18n · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
