Skip to main content

Universal localization file converter, validator, and compiler — lupdate + lrelease for all l10n formats

Project description

l10n-conv

Universal localization file converter, validator, and compiler — lupdate + lrelease for all l10n formats.

Installation

pip install l10n-conv

Supported Formats

Format Extensions Read Write
Gettext PO/POT .po, .pot
Gettext MO .mo
Qt TS .ts
XLIFF 1.2/2.0 .xlf, .xliff
Java Properties .properties
Android XML .xml
iOS Strings .strings
JSON (i18next/flat) .json
YAML (Rails i18n) .yml, .yaml
CSV/TSV .csv, .tsv
TMX .tmx
TBX .tbx
PHP arrays .php
ARB (Flutter) .arb
Fluent .ftl
Windows RESX .resx

Usage

Convert between formats

# PO → JSON
l10n-conv convert messages.po --to json -o messages.json

# XLIFF → Android XML
l10n-conv convert translations.xlf --to android-xml -o strings.xml

# Auto-detect output format from extension
l10n-conv convert messages.po -o translations.xlf

Compile

# PO → MO (like msgfmt)
l10n-conv compile messages.po -o messages.mo

Extract strings from source code

# Extract from Python/JS/C/QML source
l10n-conv extract src/ -o messages.po

Validate

# Check for issues
l10n-conv check messages.po

Statistics

l10n-conv stats messages.po

Merge

# Merge translations (like msgmerge)
l10n-conv merge base.po updates.po -o merged.po

Diff

l10n-conv diff old.po new.po

Initialize new language

l10n-conv init template.pot -l sv -o sv.po

Batch processing

# Convert all files in a directory
l10n-conv convert locale/ --to json -o output/ --batch

Options

  • --dry-run — Preview without writing
  • -v/--verbose — Detailed output
  • --batch — Process directories recursively
  • Pipe support: use - for stdin/stdout

Exit Codes

  • 0 — Success
  • 1 — Error
  • 2 — Warnings

License

GPL-3.0-or-later — Daniel Nylander daniel@danielnylander.se

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

l10n_conv-1.0.0.tar.gz (33.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

l10n_conv-1.0.0-py3-none-any.whl (40.8 kB view details)

Uploaded Python 3

File details

Details for the file l10n_conv-1.0.0.tar.gz.

File metadata

  • Download URL: l10n_conv-1.0.0.tar.gz
  • Upload date:
  • Size: 33.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for l10n_conv-1.0.0.tar.gz
Algorithm Hash digest
SHA256 95b071b9e4898e6fe63c7593df03645f7da4f33f5d80e104999707a6ea9948aa
MD5 d51d45ce72d230fc145a54850191ee2a
BLAKE2b-256 2c47a0616ce172804bf59456a82e5e7fa4b5bccc9ae7c423906eeb8d49f5e4b9

See more details on using hashes here.

File details

Details for the file l10n_conv-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: l10n_conv-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 40.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for l10n_conv-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f2e068ff29e015d21b6eea1fcb18588bf4d8dc9e8faaae005ff0b51d77e4627
MD5 c1b8cc58a8b560c4e26c25660098fca8
BLAKE2b-256 0535d89bbc72e12ad91f6c865290711ff6ffd68377ab0aa43e7e1bb21e54b4ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page