This directory shows how to integrate LocaleSync into any non-Python project that has locale JSON files.
my-project/
├── locales/ ← or i18n/, translations/, lang/, etc.
│ ├── en.json
│ ├── pl.json
│ └── de.json
├── Makefile ← optional convenience commands
└── ...
The locales/ directory contains sample locale files with nested keys and placeholders.
# From the LocaleSync repository root:
locale-sync scan examples/generic-project/locales
locale-sync check examples/generic-project/locales --source en.json
locale-sync sync examples/generic-project/locales --source en.json --dry-runIf your project uses a Makefile:
.PHONY: locales-check locales-sync
LOCALE_DIR := locales
locales-check:
locale-sync check $(LOCALE_DIR) --source en.json
locales-sync:
locale-sync sync $(LOCALE_DIR) --source en.json
locales-sync-preview:
locale-sync sync $(LOCALE_DIR) --source en.json --dry-runSee ci-example.yml for a GitHub Actions workflow that can be added to any project.