Skip to content

Integrations

Version Control Integration

Track translation changes in version control, automate commits, and review translation updates with your team.

Git Workflow

Basic Workflow

terminal
langctl pull

git diff locales/

git add locales/*.json
git commit -m "Update translations"

git push
.gitignore
.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.

terminal
#!/bin/bash
langctl pull

git add locales/*.json

echo "✓ Translations pulled and staged"
yaml
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

.github/PULL_REQUEST_TEMPLATE/translation_update.md
## 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

  1. Commit translations regularly
  2. Use descriptive commit messages
  3. Review diffs before committing — output is sorted and has no timestamps, so diffs only show real translation changes
  4. Check in CI — langctl pull --check exits with code 7 when committed files are out of date
  5. Tag releases with translation snapshots
  6. Create branches for major translation updates

Note

Version controlling translations enables rollbacks, team review, and change tracking - essential for production applications.

Next Steps