DEV Community

Cover image for Translating vs Localizing: what LLM agents get wrong about Spanish (and how I fixed it with a skill)
Ikrame Ibn Hayoun
Ikrame Ibn Hayoun

Posted on

Translating vs Localizing: what LLM agents get wrong about Spanish (and how I fixed it with a skill)

I'm a native Spanish speaker who builds websites in English first and localizes them into Spanish later. And here's the thing most people miss: Spanish is not one language, and English isn't either.

Some real examples of what "translating" gets wrong:

The plural you

In Spain, informal plural is vosotros. In Latin America it simply doesn't exist - they use ustedes instead. An agent that mixes both in the same interface instantly reads as machine-translated to millions of native speakers.

Comic-style illustration of a confused robot standing between two speech bubbles saying

The vocabulary minefield

In Spain you use an ordenador and a móvil. In Latin America it's a computadora and a celular. Neither is wrong - but picking the wrong one for your market makes your product feel foreign.

English has the same problem

colour vs color is the obvious one, but it goes deeper: in British English licence is the noun and license is the verb; American English uses license for both. A Brit writes a CV and lives in a flat on the ground floor; an American writes a resume and lives in an apartment on the first floor - which is a different floor entirely.

Dates silently lie

04/05/2026 is April 5th in the US and May 4th almost everywhere else. All-numeric dates are a bug factory when content crosses markets.

The "aterrizar" incident

A website for foreigners moving to Málaga got "landing in Málaga" translated as "aterrizando en Málaga". And here's the thing: it's not exactly wrong - "aterrizar" does mean "to land". The problem is that no Spaniard would ever say it like that. Someone from Spain would say "mudarse a Málaga" or "trasladarse a Málaga", because that's how people actually talk about moving to a city. "Aterrizar" is what planes do 🛬.

That's the gap in a nutshell: the model produced a dictionary-correct translation that sounds robotic to every native speaker it was meant for. It had full context and still went word-by-word.

Why does this happen to AI agents?

Because translation is a word-level task and localization is a context-level one. Agents default to the statistical center of "Spanish", which is really a blend of twenty countries. They merge conventions from different locales, translate placeholders and ICU messages that should stay untouched, and guess when they should ask.

So I built an agent skill that forces the right behavior:

  • A dedicated reference guide per locale (en-GB, en-US, es-ES, es-419). Never borrow conventions from a neighboring locale - that's exactly how the vosotros/ustedes mixing happens.
  • Context before words: the agent reads the page, the component and the user journey before resolving anything ambiguous. That's how "landing" becomes "tu nueva vida" instead of "aterrizando".
  • Structural safety: keys, placeholders, ICU messages, HTML tags and links stay untranslated. A Python guard diffs JSON catalogs and catches missing keys, type drift, broken placeholders and mojibake:

python scripts/locale_guard.py en.json es.json

npx skills add ikrame-ih/english-spanish-web-localization

GitHub logo ikrame-ih / english-spanish-web-localization

Context-aware EN↔ES web localization (en-GB/en-US/es-ES/es-419). Offline locale_guard; benchmarks pending.

English–Spanish Web Localization

English · Español

English

A reusable agent skill for context-aware, bidirectional localization of websites and digital products across four deliberately separate locales:

Locale Target variety
en-GB British English
en-US US English
es-ES Spanish for Spain
es-419 Broad Latin American Spanish

Offline package checks pass (VALIDATION.md). Instant mini-proof: benchmarks/results/instant-mini-2026-09-10/. I checked these myself; the full 30-case blind review is still ahead. Portfolio and external paired scores are still pending. Not for certified/sworn, legal, medical, or financial translation. Does not promise universal ATS compatibility.

This is not a word-replacement prompt. It treats copy as part of a product journey and evaluates meaning, audience, market, interface function, terminology, accessibility, SEO, layout constraints, and technical integrity before selecting a target formulation.

It also applies that standard outside a webpage: portfolios, CVs, Markdown, documentation, emails, forms, CMS exports, and locale catalogues. The format changes the checks, not the required…

Built for my own workflow, published in case it saves someone else a few "aterrizar" moments. What's the funniest literal translation you've caught an LLM producing?
Comic-style illustration of a robot dressed as a detective inspecting a terminal screen of JSON code through a magnifying glass, finding one broken key glowing red, while a girl with glasses celebrates

Top comments (0)