Localize with ChatGPT while keeping resource keys and placeholders intact

Give ChatGPT the complete message resource, target locale and interpolation syntax when translating application copy. Require the same resource keys and the same placeholder identifiers in each message. A translated sentence can read correctly while breaking the application's substitution contract.

For an i18next resource using its default delimiters, {{name}} is a runtime identifier. Translate the surrounding words; keep name exactly as the application supplies it. A translated {{nombre}} needs a different parameter and can leave the intended value unresolved.

Keep the machine contract beside the wording

This original fictional resource has three independent messages. It deliberately contains no plural-selection logic or HTML:

{
  "welcome": "Welcome, {{name}}.",
  "session": "Your session starts at {{time}}.",
  "help": "Contact {{team}} for assistance."
}

An authored Spanish draft for review is:

{
  "welcome": "Te damos la bienvenida, {{name}}.",
  "session": "Tu sesión empieza a las {{time}}.",
  "help": "Contacta con {{team}} si necesitas ayuda."
}

The keys remain welcome, session and help. Each value retains its own original token. A placeholder may move within a sentence to suit the language; its identifier still needs to match the caller.

i18next's interpolation reference, checked October 24, 2026, documents {{value}} and configurable delimiters. Confirm the actual project configuration first. Do not apply this token convention to ICU messages, custom delimiters or nested resources without adapting the contract.

Audit a plausible broken draft

Suppose a proposed translation contains:

{
  "welcome": "Hola, {{nombre}}.",
  "session": "Tu sesión empieza a las {{time}}.",
  "support": "Contacta con {{team}}."
}

Its structural findings are concrete: welcome lost {{name}} and gained {{nombre}}; the help key is missing; support is an extra key. The unchanged session token passes that structural check, but that alone does not approve its language or time formatting.

Compare parsed key sets and each corresponding message's placeholder identifiers. For this flat resource, require each original token to occur once, with no added tokens. JSON parsing catches malformed quotes; it does not catch a renamed key. A token audit catches identifier changes; it does not establish correct Spanish, punctuation or product terminology.

Ask for the resource and a separate review list

Translate this flat i18next JSON resource from English to Spanish.
Audience and tone: [ENTER]
Actual engine/version and interpolation configuration: [ENTER]
Resource, permitted terminology and UI length constraints: [PASTE]

Keep the exact resource key set. Preserve each message's {{identifier}}
tokens, including spelling, case and occurrence count; tokens may move
within the sentence. Translate values only. Do not rename keys, invent
messages, alter interpolation syntax, add HTML or change escaping.
Return valid JSON, then a separate list of language questions. Report
key/token mismatches separately from translation quality. Do not claim
native-language approval or actual application rendering.

This applies OpenAI's prompting guidance: state the task and its boundaries. Keep user-supplied interpolation values as data under the project's existing escaping policy; changing that policy is not a translation repair.

For ordinary prose, the translation guide focuses on meaning and restrictions. For count-dependent sentences, the plural-rules guide handles a separate runtime selection problem. Here, finish with a fluent-language review and actual application renders using known parameter values, then keep the approved resource in the maintained localization files.

Keep reading