Skip to content
Back to skills

I18n Bilingual Sync

ASecurity

Mirror locale JSON edits across a bilingual pair (e.g. de.json ↔ en.json) so adding/modifying/removing a key in one file is reflected in the sibling. Triggers on "translate this key", "sync locale", "i18n sync", "add translation", "de.json", "en.json", "übersetzung ergänzen", "übersetze diesen key", "locale synchronisieren", "übersetzungen abgleichen", "sprachdateien synchron halten", "fehlende übersetzungen", or when editing one locale file in a pair.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
developmentpythonbash

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add emanuelrechsteiner/claude-rcode --skill i18n-bilingual-sync --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of I18n Bilingual Sync?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for I18n Bilingual Sync
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/emanuelrechsteiner-i18n-bilingual-sync/badge)](https://www.skillsdirectory.com/skills/emanuelrechsteiner-i18n-bilingual-sync)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: i18n-bilingual-sync
description: Mirror locale JSON edits across a bilingual pair (e.g. de.json ↔ en.json) so adding/modifying/removing a key in one file is reflected in the sibling. Triggers on "translate this key", "sync locale", "i18n sync", "add translation", "de.json", "en.json", "übersetzung ergänzen", "übersetze diesen key", "locale synchronisieren", "übersetzungen abgleichen", "sprachdateien synchron halten", "fehlende übersetzungen", or when editing one locale file in a pair.
context: fork
model: haiku
allowed-tools: Read, Write, Edit, Bash, Glob
---

# i18n Bilingual Sync Skill

## Purpose

Eliminate the mechanical toil of keeping two locale JSON files (e.g. `de.json` and `en.json`) in lockstep. Evidence: in an example bilingual project, de.json/en.json were co-edited 152,591 times — a clear automation candidate.

This skill performs the mechanical JSON edits. **Translation itself is left to the calling Claude agent** — the script just takes a translated value and writes both files atomically.

## When to Invoke

- User says: "add translation for X", "translate this key", "sync locale", "add to de.json and en.json"
- You are about to edit one file of a known bilingual pair — invoke the skill instead of editing each file by hand
- Bulk renaming/removing keys across both locales

## Invocation Pattern

1. **Identify the pair.** Typically `<dir>/de.json` + `<dir>/en.json` (or another two-language pair).
2. **Compose the translation.** As the calling agent, decide the source-language value and translated target-language value.
3. **Call the script:**
   ```bash
   python3 ~/.claude/skills/i18n-bilingual-sync/scripts/sync.py \
     --source <path/to/source-locale.json> \
     --target <path/to/target-locale.json> \
     --key <dotted.key> \
     --source-value "<source string>" \
     --target-value "<translated string>"
   ```
4. **Delete a key from both files:**
   ```bash
   python3 .../sync.py --source de.json --target en.json --key nav.old --delete
   ```

## MVP Scope

- Top-level keys: `{"hello": "Hallo"}`
- Nested keys, **up to 1 level deep**: `{"nav": {"home": "Start"}}` via `--key nav.home`
- Add new key / modify existing key / delete key
- Preserves JSON formatting: `indent=2`, `ensure_ascii=False`, key order unchanged for existing keys (new keys appended at end of their object)
- Updates BOTH files in a single invocation; no partial state

## Out of Scope (NOT handled)

- Nested keys deeper than 1 level (e.g. `a.b.c.d`)
- Pluralization rules (i18next plural forms, ICU `plural`/`select`)
- ICU MessageFormat syntax (placeholders, gender, number formatting)
- Interpolation variable validation across locales
- More than 2 locale files at once (use the script twice for trilingual setups)
- Reformatting / sorting existing keys

If a request needs any of the above, fall back to manual Edit calls and flag the limitation.

## Workflow Example

User: "Add a translation key `dashboard.welcome` — German: 'Willkommen', English: 'Welcome'."

```bash
python3 ~/.claude/skills/i18n-bilingual-sync/scripts/sync.py \
  --source /proj/locales/de.json \
  --target /proj/locales/en.json \
  --key dashboard.welcome \
  --source-value "Willkommen" \
  --target-value "Welcome"
```

Both files now contain the new key under the `dashboard` object (creating the object if missing).

## Tests

Pytest suite in `tests/test_sync.py`. Run:
```bash
python3 -m pytest ~/.claude/skills/i18n-bilingual-sync/tests/ -v
```

Files in this skill

  • SKILL.md3.4 KB
  • scripts/sync.py3.5 KB
  • tests/test_sync.py4.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…