Prompt

building a Git-based localization process

Technology / Developer Tools1 observationLast seen Nov 2, 2026

Latest observation

Nov 2, 2026OpenAI APIWeb search: off

A Git-based localization process is a solid way to keep translations versioned, reviewable, and tied to your codebase. Here’s a practical blueprint you can adapt.

1) Decide your localization model

Common options:

A. File-based i18n in the repo

Store translations in the repository as JSON, YAML, PO, XLIFF, or similar.

Example:

src/
locales/
  en/
    common.json
  fr/
    common.json
  de/
    common.json

Pros:

  • Simple
  • Works well with Git
  • Easy to review diffs

Cons:

  • Translators may need tooling
  • Merge conflicts can happen

B. Git repo + translation platform

Use Git as the source of truth, but connect to a localization platform (e.g. Phrase, Lokalise, Crowdin, Transifex).

Flow:

  • Developers push source strings to Git
  • Platform handles translation workflow
  • Translations come back as PRs or sync commits

Pros:

  • Better for non-technical translators
  • QA and workflow support
  • Easier scaling

Cons:

  • More tooling and cost

2) Choose a file format

Pick a format that is:

  • Structured
  • Stable for diffs
  • Easy to validate

Good choices:

  • JSON: common, but order-sensitive unless normalized
  • YAML: readable, but indentation mistakes possible
  • PO/MO: great for translation workflows
  • XLIFF: industry standard for localization tooling

For a Git-first workflow, many teams use:

  • JSON for app localization
  • PO for software translation
  • XLIFF when integrating with translation tools

3) Define a strict key structure

Use consistent keys so translators and developers can navigate easily.

Example:

{
  "nav.home": "Home",
  "nav.about": "About",
  "auth.login.button": "Log in",
  "auth.login.error.invalid": "Invalid username or password"
}

Best practices:

  • Use stable keys, not source text as keys
  • Organize by feature or screen
  • Avoid embedding variables into keys
  • Keep keys semantic and reusable

4) Create a source language workflow

Pick one language as the source, usually English.

Workflow:

  1. Developer adds or updates source strings
  2. CI validates structure and syntax
  3. Strings are extracted into locale files
  4. Translation requests are created
  5. Translations are reviewed and merged

Important rule:

  • Source language changes should trigger translation updates

5) Use branches and pull requests

A clean Git flow might look like this:

  • main: production-ready code and translations
  • feature/*: app changes that add or modify strings
  • localization/*: translation updates

Typical process:

  1. Developer opens a feature branch with new strings
  2. CI detects untranslated keys
  3. A localization PR is created or updated
  4. Translators or reviewers edit locale files
  5. PR is merged after checks pass

This keeps translation changes visible and auditable.


6) Automate string extraction

Avoid manual editing where possible.

Use scripts to:

  • Extract keys from code
  • Compare source and target locales
  • Flag missing keys
  • Remove unused keys
  • Sort keys consistently

Example checks:

  • Every locale has the same keys
  • No empty values in required locales
  • Placeholders match across languages
  • No duplicate keys

Example CI validation:

npm run i18n:extract
npm run i18n:check

7) Add validation in CI

CI should fail if:

  • A locale file is invalid JSON/YAML
  • A required key is missing
  • Placeholder count differs
  • A translation file is malformed
  • Encoding or line endings are wrong

Example checks:

  • JSON schema validation
  • Placeholder validation: {name} must appear in all languages
  • Length checks for UI constraints
  • Encoding UTF-8 only

8) Handle placeholders carefully

Placeholders are a common source of bugs.

Example:

{
  "welcome_user": "Welcome, {name}!"
}

Rules:

  • Keep placeholder names identical across locales
  • Support pluralization properly
  • Validate ordering if needed

For pluralization, use frameworks that support ICU MessageFormat, for example:

{count, plural, one {1 file} other {# files}}

This avoids awkward manual string concatenation.


9) Support translator-friendly diffs

Make Git diffs easy to review:

  • Keep one string per line if possible
  • Sort keys consistently
  • Avoid reformatting unrelated sections
  • Don’t regenerate whole files unless necessary

If using JSON:

  • Pretty-print with stable ordering
  • Avoid minified files

10) Decide who edits translations

There are a few models:

Developer-owned

Developers update translations directly in Git.

Best for:

  • Small teams
  • Few languages
  • Technical teams

Translator-owned

Translators work in a platform or directly in PRs.

Best for:

  • Larger teams
  • Many languages
  • Ongoing localization

Hybrid

Developers manage source strings and technical checks; translators handle target languages.

This is usually the best long-term approach.


11) Set up review rules

Translations should be reviewed like code:

  • Linguistic review
  • Product review
  • In-context QA

Recommended:

  • Require approval from localization owner or reviewer
  • Protect locale files on main
  • Use CODEOWNERS for translation directories

Example:

/locales/ @localization-team

12) Handle screenshots and context

Translators need context to avoid bad translations.

Provide:

  • Screenshot references
  • UI location
  • Character limits
  • Notes for ambiguous strings
  • Variables and example values

Example annotation:

{
  "checkout.submit": "Place order"
}

Note:

  • Appears on checkout button
  • Max 20 characters on mobile
  • CTA after payment confirmation

13) Manage missing translations

Decide how your app behaves when a translation is missing:

  • Fallback to source language
  • Show placeholder like [[missing_key]]
  • Hide the string
  • Block release if required locales are incomplete

Recommended:

  • Fallback in runtime
  • Block production if required release locales are incomplete

14) Versioning strategy

Treat translation updates as normal commits, but be deliberate:

  • Commit source changes separately from translation changes when possible
  • Tag releases that include localization updates
  • Keep translation churn out of unrelated code changes

This makes rollback easier.


15) Example Git workflow

Repository structure

app/
locales/
  en.json
  fr.json
  es.json
scripts/
  extract-i18n.js
  check-i18n.js

Process

  1. Developer adds a new string in code
  2. Extraction script updates en.json
  3. CI identifies missing translations in fr.json and es.json
  4. A translation PR is created or updated
  5. Translators fill in the missing entries
  6. CI validates placeholders and completeness
  7. PR merges

16) Practical recommendations

If you’re starting from scratch:

  • Use stable semantic keys
  • Store translations in Git
  • Add CI validation
  • Use PR-based reviews
  • Keep a source language
  • Provide context for translators
  • Automate extraction and sync

If you expect growth:

  • Use a translation management platform
  • Keep Git as the authoritative code sync layer
  • Add screenshots, glossary, and translation memory support

17) Suggested minimal stack

A simple, effective setup:

  • Source strings in JSON or PO files
  • GitHub or GitLab for PRs
  • CI for validation
  • Extraction/check scripts
  • CODEOWNERS for locale files

Optional additions:

  • Translation platform
  • Screenshot capture tool
  • Glossary and style guide

If you want, I can also give you:

  1. a sample repository structure,
  2. a GitHub Actions CI example, or
  3. a full end-to-end localization workflow for web/mobile apps.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.