This guide explains how to internationalize then localize an AI-generated app: keys, locale files, extraction, glossaries, and automation that survives rapid UI churn. globalize.now is AI-powered localization infrastructure that keeps those catalogs aligned with Git on every push so you set it up once, auto-sync on every push, and skip manual file round trips. For why AI-first codebases often skip the i18n layer, read AI Code Broke Localization — And Nobody Fixed It. For industry context across tooling eras, see 3 Stages of Localization Development (And Why AI Changes Everything). For vendor sequencing when repos are still messy, read globalize.now vs Lokalise vs Crowdin and the hands-on globalization walkthrough in How to Globalize Your App with globalize.now.
What does "localize an AI-generated app" actually mean?
Localization (l10n) is what users see: correct language, plurals, dates, currency, and layout for their locale.
Internationalization (i18n) is what engineers do first: make user-visible text addressable, repeatable, and safe to translate at scale.
Most “we can’t localize yet” blockers are i18n blockers. Fix the architecture once, and localization becomes an operations problem instead of a archaeology project.
What belongs on an i18n architecture checklist before you pick tools?
Before you pick translation coordination software or a translation vendor, confirm these building blocks exist—or plan to introduce them in this order:
- Runtime i18n library appropriate to your stack (React, Next.js, Rails, etc.) with a single supported pattern for UI strings.
- Stable translation keys (namespaced, hierarchical) instead of English sentences as IDs.
- Locale resource files (JSON, PO, YAML) checked into the repo or generated in CI.
- ICU-style plurals and variables for dynamic phrases like
"{count} items"so translators can reorder grammar safely. - A string extraction pipeline so new UI does not silently bypass the catalog.
| Layer | Owns | Typical failure mode |
|---|---|---|
| UI code | Calls t("…") only | Hardcoded English in components |
| Catalog | Keys, descriptions, max lengths | Duplicate keys, missing context |
| Locales | Per-language messages | Hand-edited JSON drift from source |
| Coordination / MT | Human workflow, MT engines | Fed garbage keys or missing strings |
How do you extract strings without losing velocity?
AI-generated repos tend to repeat the same labels (“Save”, “Cancel”, “Learn more”) in dozens of files. Your extraction pass should:
- Detect user-visible literals in components, routes, and shared UI primitives—while ignoring technical strings (CSS classes, analytics IDs, URLs unless they are user-facing).
- Normalize duplicates into one key with references, so translators see a single unit of meaning.
- Emit a source locale (usually English) as the canonical value for each new key.
- Rewrite call sites to use the i18n API your team agreed on—mechanically, so the diff stays reviewable.
A minimal before/after in React-style code looks like this:
<button>Submit order</button>After extraction and keying:
<button>{t("checkout.submit_order")}</button>// locales/en.json
{
"checkout.submit_order": "Submit order"
}Why do glossaries and style guides matter before you scale languages?
Machine translation is fast. It is also easy to make every screen sound like a different product if you do not define constraints. Before you scale to many languages, write down:
- Brand terms that must not be translated (product name, feature names).
- Preferred translations for high-risk words (“contact”, “trial”, “billing”, “workspace”).
- Tone: formal vs. conversational, and second person vs. neutral.
Feed that glossary into your coordination stack or MT profile so automated drafts stay aligned with decisions your team already made.
How should automated checks anchor the translation QA loop?
Once keys flow into locale files, the modern loop is: MT draft → linter checks (length, placeholders, forbidden terms) → automated regression checks on high-impact surfaces → ship → measure. The automation saves time; the linter saves you from shipping broken placeholders.
CLI-style tooling can give you fast feedback on how much work remains in the repo, similar to:
✔ Scanned 312 files
✔ Found 1,284 user-visible literals
✔ Proposed 920 translation keys (364 duplicates merged)
✔ Wrote locales/en.json
Next: sync translation-ready keys to your coordination tool or run an MT batch with glossary v1What agent prompts keep localization refactors reviewable?
These prompts assume you are working inside a repo with tests and code review. They are written to produce diffs you can trust—not silent wide refactors.
How do you inventory UI strings before refactoring?
You are analyzing a TypeScript React codebase for localization readiness.
Task: List every pattern where user-visible English might appear (JSX text, string props that render to the DOM, template literals interpolated into UI, aria-label/title/placeholder, toasts, empty states). Exclude className values, internal IDs, and URLs that are not shown to users.
Output: a table with columns: file path, line range, example string, recommended next step (extract key / ignore / needs product decision).How do you introduce a minimal typed t() API safely?
Add a minimal i18n helper used across the app: a typed t(key, vars?) function backed by JSON locale files in /locales. Do not translate yet—only wire English as the source locale.
Constraints:
- Keys use dot namespaces: "section.component.purpose"
- Support ICU-style pluralization for keys that need counts
- Add a dev-only warning when t() is called with a missing key
Show the file tree you created and example usage in two existing components.How do you mechanically extract literals into namespaced keys?
Refactor the following files to replace user-visible string literals with t("…") keys.
Rules:
- Prefer stable semantic keys, not English sentences as keys
- Deduplicate identical UI strings to one key
- Keep string interpolation correct using ICU message patterns
- Do not change layout/styling except where required by the refactor
After edits, print a JSON object mapping each new key to its English source string for translators.How should you draft a glossary CSV translators can trust?
From locales/en.json and the product marketing pages in this repo, propose a glossary CSV with columns: term_en, part_of_speech, definition_for_translators, do_not_translate (true/false), allowed_synonyms, notes_for_de.
Flag terms that are legally sensitive (pricing, trials, refunds) and terms that are ambiguous in software ("session", "organization", "member").What CI guardrail stops new hardcoded English from landing?
Add a CI script that fails if new user-visible English literals appear in JSX outside of tests/fixtures.
Implementation guidance:
- Use the repo's existing package manager and test runner
- Provide a small allowlist file for exceptions (brand strings, intentional English)
- Print actionable file/line references on failure
Include README notes for how engineers should add exceptions responsibly.What long-term constraint should you remember when localizing AI-built products?
Localization is not a single sprint—it is a contract with your future self. If you invest once in keys, catalogs, and automation, every new AI-generated screen becomes cheaper to ship worldwide.