3.2.1 • Published 8 months ago
i18extract v3.2.1
i18extract
A command-line tool for extracting i18next translation keys from your source code and generating translation JSON files using Google Translate APIs.
Badges
Table of Contents
Installation
You can use i18extract directly via npx:
npx i18extractUsage
To extract translation keys and generate translation files, use the following command:
npx i18extract -l en,es,fr -i src/**/*.{js,jsx,ts,tsx} -o localesParameters
-l(required): List of languages to create translations for (separated by commas, e.g.,en,ca,es).-i(required): Input path to search for translation keys (glob patterns can be used).-o(required): Output directory where translation JSON files will be generated.--lint(optional): Checks if every translation key exists in the translation JSON files.
Examples
Basic Usage:
npx i18extract -l en,es,fr -i src/**/*.{js,jsx,ts,tsx} -o localesThis command searches the
srcfolder for translation keys (e.g.,t('Hi')) and generates:locales/en.json{ "Hi": "Hi" }locales/es.json{ "Hi": "Hola" }locales/fr.json{ "Hi": "Salut" }
Using the Linter:
npx i18extract -l en,es,fr -i src/**/*.{js,jsx,ts,tsx} -o locales --lintThis command will check for missing translations:
>> error: no translation found for "Hi"
License
Feel free to let me know if you want to add or modify any sections!3.2.1
8 months ago
3.2.0
8 months ago
3.1.0
8 months ago
3.0.0
8 months ago
2.0.3
11 months ago
2.0.2
11 months ago
2.0.1
12 months ago
2.0.0
12 months ago
1.0.12
1 year ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago