| Crates.io | langcodec-cli |
| lib.rs | langcodec-cli |
| version | 0.6.4 |
| created_at | 2025-07-03 16:50:25.782364+00 |
| updated_at | 2025-10-05 08:41:30.560713+00 |
| description | A universal CLI tool for converting and inspecting localization files (Apple, Android, CSV, etc.) |
| homepage | https://github.com/WendellXY/langcodec |
| repository | https://github.com/WendellXY/langcodec |
| max_upload_size | |
| id | 1736537 |
| size | 282,839 |
Universal CLI for converting, inspecting, merging, and editing localization files.
.strings, .xcstrings, Android strings.xml, CSV, TSVcargo install langcodec-cli
langcodec convert -i input.strings -o strings.xml
langcodec convert -i input.csv -o output.xcstrings --source-language en --version 1.0
Auto-detects formats from extensions. For JSON/YAML custom formats, see --input-format in the root README.
langcodec merge -i a.strings -i b.strings -o merged.strings --lang en --strategy last
langcodec view -i values/strings.xml --full
Prints entries. Plurals are labeled with Type: Plural and show categories.
langcodec stats -i values/strings.xml
langcodec stats -i Localizable.xcstrings --json
Shows per-language totals, counts by status, and completion percent (excludes DoNotTranslate). Use --json for machine-readable output.
langcodec debug -i input.strings --lang en -o output.json
Unified in-place editing (add/update/remove) across one or many files.
Basics:
# Add or update a key
langcodec edit set -i en.strings -k welcome -v "Hello" --status translated --comment "Shown on home"
# Remove a key (omit or empty value)
langcodec edit set -i en.strings -k welcome
langcodec edit set -i en.strings -k welcome -v ""
# Multiple files or globs (quote patterns)
langcodec edit set -i 'locales/**/*.strings' -k app_name -v "My App"
langcodec edit set -i a.strings -i b.strings -k welcome -v "Hello"
# Preview only
langcodec edit set -i en.strings -k welcome -v "Hello" --dry-run
# Write to a different file (single input only)
langcodec edit set -i en.strings -k welcome -v "Hello" -o out.strings
Options:
Supported formats: .strings, .xml (Android), .xcstrings, .csv, .tsv. Custom JSON/YAML/.langcodec edit is currently not enabled.
<plurals> are supported.en.lproj/Localizable.strings, values-es/strings.xml, base values/ → en by default.'**/*.xml').MIT