Stop Copy-Pasting Into Google Translate: Automate React i18n in 5 Minutes
Tired of manually copying strings into Google Translate? Automate React i18n with an open-source CLI that uses your own LLM key — no account, no hosted API.
Key takeaway
Tired of manually copying strings into Google Translate? Automate React i18n with an open-source CLI that uses your own LLM key — no account, no hosted API.
You're about to deploy. Marketing just added 47 new strings to the app.
You copy the first one into Google Translate. Paste the Spanish back into your JSON file. Then French. Then German.
Thirty minutes later, you're still copying and pasting, and you've only done half.
Your deployment window closes in an hour.
There has to be a better way.
The problem
Manual translation workflows are killing developer productivity.
Here's what the typical process looks like:
- Copy each string from your
en.jsonfile into Google Translate - Manually paste translations back into
es.json,fr.json,de.json - Fix the formatting that got broken during copy-paste
- Debug placeholder variables like
{username}that translators accidentally changed - Repeat for every single deployment when new strings are added
- Waste 30–60 minutes per deploy on work a script should handle
The real kicker? This manual process introduces errors about 15–20% of the time — a misplaced placeholder, a forgotten escape character, a copy-paste mistake. Suddenly your production app is showing undefined instead of user names.
The solution
Automation — with a tool you fully control.
Shipi18n is an open-source CLI (Apache-2.0). There's no Shipi18n account and no hosted API: translation runs against your own Anthropic or OpenAI key (or any OpenAI-compatible endpoint), and nothing is sent to a Shipi18n server. Your source JSON goes in, translated JSON comes out, with every placeholder preserved.
No more human copy-paste errors. No more wasted time. No vendor in the middle.
Step-by-step guide
Let's set up automated translation for a React app. About 5 minutes.
Step 1: Bring your own LLM key
Get a key from Anthropic or OpenAI and set it as an environment variable. Shipi18n has no account of its own — it uses yours, and your provider bills you directly (typically pennies for a locale file).
export ANTHROPIC_API_KEY=your-key-here
Step 2: Translate
No install and no config file needed — run it with npx, and options are flags so the command is identical locally and in CI:
npx @shipi18n/cli translate src/locales/en.json -t es,fr,de --incremental
# writes src/locales/es.json, fr.json, de.json — only re-translating changed keys
Placeholders ({username}, {{count}}, %s, …), HTML tags and formatting are preserved automatically. You'll see output like:
✓ Loaded source: en.json (127 keys)
✓ Translating to Spanish, French, German…
✓ Placeholders validated in all files
✓ Done — 3 files written
The idiomatic place to record the command is an npm script:
// package.json
{
"scripts": {
"i18n": "shipi18n translate src/locales/en.json -t es,fr,de --incremental"
}
}
Step 3: Check before you ship (the part copy-paste never did)
Translation is only half the job — the other half is catching the translation that looks fine but dropped a placeholder or says the wrong thing. Shipi18n's structural check needs no API key at all:
npx @shipi18n/cli check ./locales -s en
It flags missing keys, dropped placeholders, collapsed plurals and empty values — the bugs a build otherwise ships green. (Add --semantic with your key for an LLM pass that catches mistranslations too.)
Step 4: Review and deploy
git diff src/locales/es.json
{
"welcome": "Bienvenido, {username}!",
"itemCount": "Tienes {count} artículos en tu carrito"
}
{username} and {count} stayed intact. Commit and deploy:
git add src/locales/
git commit -m "Add Spanish, French, German translations"
git push
Step 5: Automate in CI (bonus)
Translate and check automatically whenever en.json changes:
# .github/workflows/translate.yml
name: Auto Translate
on:
push:
paths:
- 'src/locales/en.json'
jobs:
translate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Translate
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: npx @shipi18n/cli translate src/locales/en.json -t es,fr,de --incremental
- name: Check
run: npx @shipi18n/cli check ./src/locales -s en
- name: Commit translations
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add src/locales/
git commit -m "Auto-translate: update translation files" || echo "no changes"
git push
You can also use the Shipi18n GitHub Action directly, which adds SARIF annotations on the PR.
The time savings
| Method | Time per deploy | Error rate | Placeholder safety | Cost |
|---|---|---|---|---|
| Manual Google Translate | ~45 min | High (~15%) | Manual checking | Your time |
| Shipi18n CLI (BYO-LLM) | ~2 min | Low (placeholders validated) | Automatic + check gate | Your own LLM usage (pennies) |
If you deploy twice a week, that's well over 70 hours a year back per developer — and no broken placeholders slipping into production.
Key takeaways
- Manual translation wastes 30–60 minutes per deploy and introduces errors 15–20% of the time.
- A CLI automates it with placeholders preserved — and it's open source, using your LLM key, with no account or hosted API.
checkcatches what translation can't — dropped placeholders and broken strings, with no API key.- CI integration makes it fully hands-off.
Next steps
- Shipi18n on GitHub — open source, Apache-2.0
- CLI commands · GitHub Action
- Try the free in-browser checker — nothing uploaded
Stop copying. Start shipping — and check it before you do.
Does your CI check your translations?
One command, no account, no API key — the structural check runs anywhere. Apache-2.0, bring your own LLM for the semantic pass.
Star on GitHub →