1.0.12 • Published 9 months ago

@msomsina/i18n-manager v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

i18n-manager

A powerful tool for managing translations in your project.

Installation

Global Installation

npm install -g @msomsina/i18n-manager

Local Installation

npm install @msomsina/i18n-manager

Usage

Global Usage

After global installation, you can use the tool from anywhere:

i18n-manager <command> [options]

Local Usage

After local installation, you can use the tool in your project:

npx i18n-manager <command> [options]

Global Options

  • -p, --path <path> - Path to translations directory (default: "src/assets/i18n")
  • -b, --base-lang <lang> - Base language code (default: "en")

Commands

Create New Language

i18n-manager create <language-code> [--path <path>] [--base-lang <lang>]

Example:

# Using default path and base language (src/assets/i18n, en)
i18n-manager create fr

# Using custom path
i18n-manager create fr --path src/assets/i18n

# Using custom base language
i18n-manager create fr --base-lang ru

This will create a new translation file fr.json with the same structure as your base language file.

Sync Translations

i18n-manager sync [--path <path>] [--base-lang <lang>]

Example:

# Using default path and base language
i18n-manager sync

# Using custom path
i18n-manager sync --path src/assets/i18n

# Using custom base language
i18n-manager sync --base-lang de

This will sync all missing translations with the base language file.

Check Translations

i18n-manager check [--path <path>] [--base-lang <lang>]

Example:

# Using default path and base language
i18n-manager check

# Using custom path
i18n-manager check --path src/assets/i18n

# Using custom base language
i18n-manager check --base-lang es

This will check for missing translations in all language files.

License

MIT

1.0.12

9 months ago

1.0.11

9 months ago

1.0.10

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago