- Notifications
You must be signed in to change notification settings - Fork0
i18nCSV is a streamlined tool for effective internationalization, offering seamless integration with Google Docs, Google Translate, and ChatGPT for enhanced translation capabilities. Easily extract and import i18n data using CSV files, simplifying the localization workflow.
baotlake/i18nCSV
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A super easy-to-use cross-platform i18n tool for efficiently managing your i18n files in a table UI. Provides i18n machine translation, ChatGPT translation, and team collaboration solutions.
- Table UI interface
- Single text file, supports Git version control
i18nCSV +Google Sheets:
- SupportsGoogle Translate translation
- Supports ChatGPT GPT-3.5, GPT-4 translation (requires installation ofGoogle Workspace App)
- Supports manual translation, team collaboration translation
Manual Management | i18nCSV |
---|---|
❌ Edit JSON code without UI | ✅ Supports table UI |
❌ Manually manage JSON files for dozens of languages | ✅ Manage a single table document (CSV or Google Sheets) |
❌ Adding/deleting messages requires editing JSON files for each language | ✅ Adding or deleting messages only requires adding or deleting a row in the table |
❌ No batch operations, no automatic translation | ✅ Supports selecting rows or columns, supports automatic translation with formulas |
❌ No real-time collaboration | ✅ With Google Sheets, supports real-time team collaboration |
Usage: i18ncsv.py [OPTIONS] I18N_DIR CSV_PATHOptions: -e, --extract extract csv from i18n directory -n, --msg-name TEXT i18n message filename -p, --prioritize TEXT Languages to prioritize at the beginning of CSV columns, e.g., 'en,zh'. -o, --overwrite overwrites existing i18n messages, default is False -w, --watch FLOAT Enable watch mode to automatically update i18n when the CSV file changes. --sheet-name TEXT The name of the sheet --range TEXT Any valid range specifier, e.g. A1:C99 or B2:F --help Show this message and exit.
Export CSV from existing i18n messages.
python ./i18ncsv.py -e ./i18n i18n.csv
# Update i18n from a local csv filepython ./i18ncsv.py ./i18n ./i18n.csv# Watch modepython ./i18ncsv.py ./i18n ./i18n.csv -w# Overwrite existing i18n file contentpython ./i18ncsv.py ./i18n ./i18n.csv -w -o
# Update i18n from a Google Sheets document# Make sure to set Google Sheets to be viewable by anyone with the linkpython ./i18ncsv.py ./i18n https://docs.google.com/spreadsheets/d/xxxxxxxxxxx/ -w -o
When updating i18n, you can automatically create corresponding files by specifying the directory structure through--msg-name
, where<code>
represents the code for the respective language.
python ./i18ncsv.py ./i18n ./i18n.csv --msg-name'<code>.json'├── en.json├── zh.json├── ja.json
python ./i18ncsv.py ./i18n ./i18n.csv --msg-name'<code>/messages.json'├── en│ └── messages.json├── zh│ └── messages.json├── ja│ └── messages.json
About
i18nCSV is a streamlined tool for effective internationalization, offering seamless integration with Google Docs, Google Translate, and ChatGPT for enhanced translation capabilities. Easily extract and import i18n data using CSV files, simplifying the localization workflow.