# auto-i18n-transform

> vueautoi18n

Latest version **1.0.0** (published 2023-10-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install auto-i18n-transform
pnpm add auto-i18n-transform
yarn add auto-i18n-transform
bun add auto-i18n-transform
```

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 | 2023-10-24 |
| First published | 2023-10-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 23 |
| Unpacked size | 50.4 KB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| Author | 康俊鹏 |
| Maintainers | junpengkang |

## Links

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

## Dependencies (23)

- [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
- [vue-template-compiler](https://npm.io/package/vue-template-compiler.md) ^2.6.14
- [@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) — 2023-10-24

## README

# auto-i18n-transform

## 安装

```
npm i -D auto-i18n-transform
```

## 配置 webpack loader

```js
module.exports = {
  // ... 其他配置
  module: {
    rules: [
      {
        enforce: "pre", // 此项一定要加上 优先执行的loader
        test: /\.(js|vue)$/,
        use: [
          {
            loader: "auto-i18n-transform",
          },
        ],
        exclude: /node_modules/,
      },
    ],
  },
};
```

## 配置 auto-i18n-transform

```js
module.exports = {
  language: ["zh", "en"], // 需要国际化的语言种类
  exclude: [], // 需要忽略文件
  i18nInstance: "import i18n from '@/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/auto-i18n-transform · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
