Integrations
Version Control Integration
Track translation changes in version control, automate commits, and review translation updates with your team.
Git Workflow
Basic Workflow
langctl pull
git diff locales/
git add locales/*.json
git commit -m "Update translations"
git push .env Tip
Commit translation files and langctl.json to git for version tracking, rollback capability, and team visibility. langctl.json only holds the project, format and paths — store API keys in CI/CD secrets (LANGCTL_API_KEY), never in the repository.
#!/bin/bash
langctl pull
git add locales/*.json
echo "✓ Translations pulled and staged" name: Update Translations
on:
schedule:
- cron: '0 2 * * *' # Daily at 2 AM
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- name: Pull Translations
env:
LANGCTL_API_KEY: ${{ secrets.LANGCTL_API_KEY }}
run: npx langctl@0 pull
- name: Commit Changes
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add locales/*.json
git diff --quiet && git diff --staged --quiet || git commit -m "Update translations [skip ci]"
git push Pull Request Reviews
Translation PR Template
## Translation Update
### Changes
- Updated Spanish translations (24 keys)
- Added French translations (12 keys)
- Fixed typos in English (3 keys)
### Checklist
- [ ] All keys have translations
- [ ] Parameters are preserved
- [ ] Tested in staging environment
- [ ] Reviewed by native speaker (if available)
### Pull Command
\`\`\`bash
langctl pull
\`\`\` Best Practices
- Commit translations regularly
- Use descriptive commit messages
- Review diffs before committing — output is sorted and has no timestamps, so diffs only show real translation changes
- Check in CI —
langctl pull --checkexits with code 7 when committed files are out of date - Tag releases with translation snapshots
- Create branches for major translation updates
Note
Version controlling translations enables rollbacks, team review, and change tracking - essential for production applications.
Next Steps
- CI/CD Integration - Automate pulls and checks
- Export Guide - Export documentation
- CLI Export & Import - Pull, push, export and import commands