Prompt

How do I set up a localization workflow for a web app?

Technology / Developer Tools1 observationLast seen Nov 2, 2026

Latest observation

Nov 2, 2026OpenAI APIWeb search: off

A good localization workflow for a web app usually has 5 parts:

  1. Extract text into translation files
  2. Use stable translation keys
  3. Wire translations into your app
  4. Track and manage translation updates
  5. Automate validation and deployment

Here’s a practical setup.


1) Pick your localization strategy

Recommended approach

Use message keys + translation files rather than hardcoding strings.

Example:

// en.json
{
  "home.title": "Welcome",
  "home.subtitle": "Manage your account"
}

Then in code:

t("home.title")

This keeps copy separate from code and makes translations easier to maintain.

Avoid

  • Hardcoding text directly in UI components
  • Using sentence text itself as the key
  • Mixing translated strings with business logic

2) Organize translation files

A common structure:

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

Or one file per language if the app is small.

Good practice

Split by feature/domain:

  • common
  • auth
  • checkout
  • profile

This makes files easier to manage as the app grows.


3) Use an i18n library

Choose one based on your stack:

  • React: react-i18next, FormatJS, Lingui
  • Vue: vue-i18n
  • Angular: built-in i18n or ngx-translate
  • Next.js: next-intl, next-i18next, react-intl

What the library should handle

  • Language detection
  • Translation lookup
  • Pluralization
  • Interpolation
  • Fallback languages
  • Date/number formatting

4) Use proper translation keys

Prefer semantic keys:

{
  "cart.itemsCount": "You have {{count}} items"
}

Avoid:

{
  "msg_1042": "You have {{count}} items"
}

Semantic keys are easier for developers and translators to understand.

Rule of thumb

Keys should describe meaning, not appearance:

  • button.save
  • error.network
  • profile.header

5) Handle interpolation and plurals

Interpolation

t("cart.itemsCount", { count: 3 })

Pluralization

Use ICU/message-format support if possible:

{
  "cart.itemsCount": "{count, plural, one {# item} other {# items}}"
}

This is important for non-English languages, where plural rules are more complex.


6) Decide how translators will work

Typical workflow:

Developer workflow

  1. Add/modify keys in source language files
  2. Run extraction or update scripts
  3. Commit changes
  4. Send files to translators or localization platform
  5. Merge translated files back

Translator workflow

  • Translators work in a localization platform such as:
    • Phrase
    • Lokalise
    • Crowdin
    • Transifex
    • Weblate

These tools help with:

  • Translation memory
  • Glossaries
  • Review workflow
  • Missing string detection
  • Machine translation suggestions

7) Automate extraction and syncing

If your library supports extraction, use it.

Example flow

  • Scan source code for t("...")
  • Extract keys into a base locale file
  • Compare with existing translations
  • Mark missing keys

This prevents drift between code and translation files.

Helpful automation

  • Pre-commit hook to validate keys
  • CI check for missing translations
  • Script to sort keys consistently
  • Script to remove unused keys

8) Add fallbacks

Always define a fallback language, usually English.

If fr is missing a key, the app should:

  1. Try fr
  2. Fall back to en
  3. Optionally show a placeholder if missing entirely

This prevents broken UI in partially translated releases.


9) Format locale-sensitive data

Don’t manually format:

  • Dates
  • Times
  • Numbers
  • Currencies
  • Percentages

Use locale-aware APIs:

new Intl.DateTimeFormat(locale).format(date)
new Intl.NumberFormat(locale, { style: "currency", currency: "EUR" }).format(1234.56)

This ensures correct formatting per region.


10) Support RTL languages early

If you may support languages like Arabic or Hebrew:

  • Use CSS logical properties where possible
  • Test layout flipping
  • Ensure icons and spacing behave correctly
  • Add dir="rtl" handling

11) Create a release process

A practical release flow:

  1. Dev adds new strings
  2. Base locale is updated
  3. Translation files are sent to localization tool
  4. Translators complete work
  5. QA reviews UI in each locale
  6. Release translations with the app
  7. Monitor for missing keys or layout issues

Good idea

Translate in parallel with development, not at the end.


12) Add quality checks

Use CI to catch problems like:

  • Missing keys
  • Extra keys
  • Empty translations
  • Invalid placeholders
  • Broken ICU syntax

Example checks:

  • All locales have the same keys
  • Placeholder names match across languages
  • No untranslated strings in production

13) Test localization in the app

Test:

  • Long translations
  • Short translations
  • Pseudo-localization
  • Plurals
  • RTL layouts
  • Date/number formatting
  • Font support for all target scripts

Pseudo-localization

This is very useful:

  • Expands text length
  • Reveals hardcoded strings
  • Exposes layout overflow
  • Catches encoding issues

Example pseudo-text: [!!! Wëlcømë !!!]


14) Keep content and code separate

For maintainability:

  • Let product/UX copy live in translation files
  • Don’t duplicate strings across components
  • Use shared reusable keys for common UI
  • Avoid reusing a translation key for different meanings

15) A simple recommended workflow

If you want a straightforward setup:

  1. Use en as source language
  2. Store translations in JSON files
  3. Use react-i18next / vue-i18n / equivalent
  4. Manage keys by feature
  5. Sync to a localization platform
  6. Add CI checks for missing keys
  7. Use Intl for dates/numbers/currency
  8. Test with pseudo-localization and RTL

Example workflow in practice

1. Add text in code

t("checkout.payNow")

2. Add base translation

{
  "checkout.payNow": "Pay now"
}

3. Extract/sync to localization tool

4. Translators fill:

{
  "checkout.payNow": "Payer maintenant"
}

5. App loads based on user locale

setLocale("fr")

If you want, I can also give you:

  • a React-specific localization setup
  • a Next.js localization workflow
  • or a step-by-step CI/CD pipeline for translations

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.