Skip to content

Git-First Localization

Summary

A localization approach where translations live directly in the version control repository as code files, making the repo the single source of truth for both source strings and translations — rather than maintaining a separate translation database.

Core Principle

"Your repo is the source of truth."

Instead of a separate translation management system that stores translations in its own database, a Git-first system treats translation files as code — committed, versioned, branched, and reviewed alongside the source code.

How It Works

  1. Translation files in repo — PO, JSON, XLIFF, YAML files live alongside source code
  2. Weblate clones the repo — Reads translation files directly from Git
  3. Translators edit via Weblate UI — Web-based editing interface
  4. Changes committed back — Weblate commits translations back to the repo
  5. Webhooks sync changes — Source changes trigger Weblate updates automatically

Weblate Implementation

  • From version control — Add components by pointing to a Git repo URL
  • Automatic detection — Add-on (weblate.discovery.discovery) finds new translation files
  • Push on commit — Configurable automatic push of translations back to repo
  • Commit interval — Set how often pending changes are committed (e.g., every 24 hours)
  • Access control — Public (open contributions), Protected (invited translators), Private

Benefits

  • Single source of truth — No separate database to sync
  • Version history — Full Git history of every translation change
  • Code review — Translation changes can be reviewed via PRs
  • Branching — Translation branches follow code branches
  • Auditability — Every change is traceable to a commit
  • Data sovereignty — No vendor lock-in; your translations live in your repo

Tradeoffs

  • No first-party runtime OTA/SDK — Weblate handles translation management, but runtime delivery is self-managed (via static file builds, separate APIs)
  • Not a one-stop platform — Doesn't unify web/mobile/backend runtime delivery like Transifex Native
  • Requires Git infrastructure — Needs a Git hosting service (GitHub, GitLab, Bitbucket)

Comparison with Database-First

Git-First (Weblate) Database-First (Tolgee, Phrase)
Source of truth Your Git repository Platform's database
Translation files In the repo Exported on demand
Version history Git commits Platform activity log
Runtime delivery Self-managed SDK-based or exported files
Vendor lock-in None (files are in your repo) Export required to leave
Developer workflow Familiar Git workflow Platform-specific workflow

See Also