Translate text between languages with cultural adaptation, terminology consistency, and support for multiple document types including technical docs, marketing copy, and UI strings.
This skill enables an AI agent to translate text between languages while preserving meaning, tone, and context. It goes beyond word-for-word substitution by handling idiomatic expressions, cultural nuance, domain-specific terminology, and formality registers. The agent can translate technical documentation, marketing copy, UI strings, legal text, and general prose, adapting output to the conventions of the target locale.
Analyze Source Context Examine the source text to determine its domain (technical, marketing, legal, casual), register (formal, informal, neutral), and intended audience. Identify any idiomatic expressions, culturally specific references, or humor that will require adaptation rather than literal translation. Note the document format (plain text, Markdown, JSON, HTML) so structure is preserved in the output.
Research Terminology For specialized content, build or consult a terminology glossary to ensure consistency. Technical documents require exact translations of domain terms (e.g., "endpoint" stays "endpoint" in many languages or maps to an accepted equivalent). Marketing copy may need creative transcreation rather than direct translation. If the user provides a glossary or translation memory, integrate it before proceeding.
Translate the Content
Produce the translation following the determined tone, formality level, and terminology. Preserve all formatting markers such as Markdown headings, code blocks, HTML tags, and JSON keys. For UI strings, keep placeholder tokens (e.g., {username}, %d) intact and in the correct grammatical position for the target language. Handle pluralization rules specific to the target language.
Localize Cultural References Adapt units of measurement, date formats, currency symbols, and culturally bound metaphors to the target locale. For example, convert miles to kilometers when translating for a European audience, or replace an American sports analogy with one that resonates in the target culture. For marketing content, ensure slogans and calls-to-action carry the same persuasive impact in the target language.
Review for Accuracy and Fluency Re-read the translated text to verify grammatical correctness, natural phrasing, and faithful representation of the source meaning. Check that no sentences were accidentally omitted or duplicated. Confirm terminology consistency across the entire document by cross-referencing the glossary established in step 2.
Deliver with Annotations Return the translated text in the same format as the source. Where translation choices were ambiguous, include brief translator notes explaining the reasoning. If the user requested multiple formality levels or regional variants, provide each variant clearly labeled.
Provide the text to translate along with the target language. Optionally specify:
Example prompt: "Translate the following API error messages to Japanese (formal). Keep the JSON structure and all placeholder tokens intact."
Input:
The authentication module uses OAuth 2.0 with PKCE to secure API requests. When a user initiates a login, the client generates a code verifier and code challenge. The authorization server validates the challenge before issuing an access token. Tokens expire after 3600 seconds and must be refreshed using the refresh token endpoint.
Output:
Das Authentifizierungsmodul verwendet OAuth 2.0 mit PKCE, um API-Anfragen abzusichern. Wenn ein Benutzer eine Anmeldung einleitet, erzeugt der Client einen Code-Verifier und eine Code-Challenge. Der Autorisierungsserver validiert die Challenge, bevor er ein Zugriffstoken ausstellt. Token laufen nach 3600 Sekunden ab und müssen über den Refresh-Token-Endpunkt erneuert werden.
Translator note: "Code Verifier," "Code Challenge," and "Refresh-Token-Endpunkt" are kept close to the English originals because these are established terms in the German-speaking developer community.
Input:
{
"greeting": "Hello, {username}!",
"items_in_cart": "You have {count} item(s) in your cart.",
"checkout_button": "Proceed to Checkout",
"empty_cart": "Your cart is empty. Start shopping!",
"order_confirmation": "Your order #{orderId} has been placed on {date}."
}
Output:
{
"greeting": "Hola, {username}!",
"items_in_cart": "Tienes {count} artículo(s) en tu carrito.",
"checkout_button": "Proceder al pago",
"empty_cart": "Tu carrito está vacío. ¡Empieza a comprar!",
"order_confirmation": "Tu pedido n.º {orderId} se ha realizado el {date}."
}
Translator note: Placeholder tokens {username}, {count}, {orderId}, and {date} are preserved exactly. The informal "tú" form is used; switch to "usted" for formal contexts.