@easyi18n/cli
v0.0.1-alpha.4
Published
## Usage
Downloads
149
Readme
@easyi18n/cli
Usage
Configuration
@easyi18n/cli uses cosmiconfig for configuration file support. This means you can configure it in multiple ways:
i18n
property inpackage.json
.i18nrc
file in JSON or YAML format.i18nrc.json
,.i18nrc.yaml
,.i18nrc.yml
,.i18nrc.js
,.i18nrc.ts
,.i18nrc.mjs
, or.i18nrc.cjs
filei18nrc
,i18nrc.json
,i18nrc.yaml
,i18nrc.yml
,i18nrc.js
,i18nrc.ts
,i18nrc.mjs
, ori18nrc.cjs
file inside a.config
subdirectoryi18n.config.js
,i18n.config.ts
,i18n.config.mjs
, ori18n.config.cjs
file
The configuration file should export an object with your desired options. For example:
Roadmap
- [ ] Support both single file and directory formats as entry points
- [ ] Simplify configuration by automatically detecting entry format (file or directory)
- [ ] Add user-friendly CLI prompts for configuration setup
- [ ] Implement a
init
command to generate a default configuration file - [ ] Provide clear documentation and examples for each configuration option
- [ ] Example project support for react-i18next
- [ ] Handle complex ICU patterns (e.g., plurals, selects) correctly during translation
- [ ] Implement JSON repair functionality for LLM translation output
- [ ] Improve error handling and reporting for translation process
- [ ] Add support for custom translation services beyond the default
Local Development
Start the development server:
turbo dev --filter=@easyi18n/cli
Start translation:
cd packages/easy-i18n-cli node dist/cli.js -l all -f common