locale-adaptation
Published
Public
in @translation-essentialseval100%

Adapt text for a target locale beyond literal translation — idioms, cultural references, units, date/currency formats, spelling — with an auditable list of every adaptation made.

locale-adaptation

Translation is not localization. "We're open 9/10 until 5:30 PM, just 2 miles from downtown" translated literally into German is grammatically fine and culturally wrong — the date is ambiguous, nobody thinks in miles, and "downtown" has no Innenstadt-shaped equivalent word-for-word. This prompt adapts text for a target locale (de-DE, pt-BR, en-GB, …): idioms, cultural references, units, date/number/currency formats, spelling — and returns an auditable list of every adaptation, so a reviewer can see exactly what changed and why.

Works same-language too: en-USen-GB is pure adaptation (colour, lorry, DD/MM) with no translation at all.

Entrypoints

EntrypointRendersInputs
systemLocalization instructions + embedded output schematarget_locale
userThe delimited text block + target localetext, target_locale

Render system as the system message and user as the user message. Pass target_locale to both renders.

Variables

  • text (string, required) — the text to adapt; placeholders/HTML/markdown preserved verbatim.
  • target_locale (string, required) — BCP-47 tag ("de-DE", "pt-BR", "en-GB"). A bare language code ("de") means that language's most common locale.

Output

{
  "reasoning": "de-DE: convert miles to km, rewrite the ambiguous US date, use 24-hour time.",
  "adapted_text": "Wir haben am 10. September bis 17:30 Uhr geöffnet, nur 3 km von der Innenstadt entfernt.",
  "adaptations": [
    { "kind": "date_format", "original": "9/10", "adapted": "10. September", "reason": "US M/D date is ambiguous in Germany" },
    { "kind": "units", "original": "2 miles", "adapted": "3 km", "reason": "Germany uses metric; rounded naturally" }
  ]
}
  • adaptations is the point of this prompt: every change beyond plain translation, categorized (idiom, cultural_reference, units, date_format, number_format, currency_format, spelling, vocabulary, other) with the original and adapted segments verbatim. Plain translation is not listed — the array is signal, not noise.
  • Currency is reformatted, never converted$5 stays a dollar amount; converting at an imaginary exchange rate would change the text's claims.
  • Unit conversions use real arithmetic, rounded to match the source's precision register.

House conventions

  • Reasoning-first, key order pinned in the system prompt.
  • Closed kind enum for adaptation categories; strict schema throughout.
  • Injection-safe input: triple-mustache inside <text>, treated as data.
  • Empty-input behaviour specified: empty text → empty output, empty list.

Part of the Translation Essentials collection — run after text-translation when you need locale-true output, and grade with translation-qa-grading.

@sufleur/