Skip to content

LocaleSync

LocaleSync

LocaleSync – Auto-Sync & Translate Locale Files

One command to fill the gaps in your translation files.

CLI Developer Tool
CI PyPI Version License Stars Issues Last Commit
4
Commands
265+
Tests
Languages Supported
0
Config Required

About

LocaleSync is an open-source Python CLI tool that scans your project for locale JSON files, detects missing translation keys, and auto-fills them via Google Translate — with full placeholder protection. It supports deeply nested JSON, auto-discovers locale directories, and works with any frontend framework (Angular, React, Vue, plain HTML). Run it locally during development or plug it into CI/CD pipelines for automated checks. Four commands cover every workflow: scan, check, sync, and translate.

Key Features

01

Auto-Discovery

Point it at your project root and LocaleSync finds locale directories automatically — no config files needed.

02

Google Translate Integration

Translates missing keys via the free Google Translate API. Handles rate limits gracefully with automatic retries.

03

Placeholder Protection

Safeguards {{variables}}, {0}, %s, and other interpolation tokens so they survive translation intact.

04

Deep Nested JSON

Handles arbitrarily nested locale structures — compares at every depth, preserves hierarchy on write.

05

Rich Progress Bar

Live progress with ETA, key counter, elapsed time, and language tracker. Cancel anytime with Ctrl+C.

06

CI/CD Ready

Non-interactive mode with proper exit codes. Use check in CI to block PRs with missing translations.

07

Framework Agnostic

Works with Angular, React, Vue, Svelte, plain HTML, or any project that uses JSON locale files.

08

Extensible Architecture

Clean, layered design with pluggable translation providers, file formats, and sync strategies. MIT licensed.

How It Works

Install with pip: pip install locale-sync. Then run one of four commands — scan to discover locale files, check to detect missing keys (great for CI), sync to fill missing keys with source text, or translate to auto-translate via Google Translate. Point it at any directory — LocaleSync auto-discovers the locale folder, picks the source language, and handles everything else.

Privacy & Security

Your code stays on your machine. Translation text goes through Google Translate only when you run the translate command.

Local File Processing No Telemetry No Account Required Open Source (MIT) Opt-in Translation Only

Product Info

  • Commandsscan, check, sync, translate
  • Python3.12+
  • TranslationGoogle Translate
  • File FormatJSON (nested)
  • PublisherPOLPROG
  • LicenseMIT
  • PriceFree

Install

Via pip (Recommended):
pip install locale-sync
Quick Start:
locale-sync scan .
locale-sync check ./locales
locale-sync translate ./locales