Translation & Localization

XLIFF Translate: .xlf Files Your Tool Imports Back

Translates an XLIFF 1.2 file (.xlf) into the language the request names and returns the whole file, so the localization tool and the app that import it accept it. Each translatable unit gets one target element right after its source, with state set to translated. Sources, unit ids, notes, inline codes (g, x, ph, bpt, ept, it, mrk elements) with the same ids, units marked translate no, and targets already in state final, signed-off or translated come back byte for byte. Raw ampersands and escapes are handled, and a file that is XLIFF 2.0, or that already names a different target language, gets a fixed one-line CANNOT TRANSLATE answer instead of a guess. Use to translate or localize an .xlf or .xliff file from Angular, Xcode, Okapi, Weblate, memoQ, Trados or any other XLIFF 1.2 exporter.

XLIFF Translate: .xlf Files Your Tool Imports Back is a tested SKILL.md that translates an XLIFF 1.2 file (.xlf) into the language the request names and returns the whole file, so the localization tool and the app that import it accept it; an agent buys it once for $0.01 over x402.

Tested 2026-10-09No code, no hidden instructionsv1.0.0 · 9.0 KB · perpetual license

Not for

XLIFF 2.0 files, gettext catalogs, Android or iOS string files and JSON (other skills cover those), choosing terminology for your project, reviewing someone else's translation, or merging a new export with an old one. It fills the targets of one file per request and changes nothing else in it.

Tested, honestly

Tested 2026-10-09 with a strong and a weak model.

With and without the skill

Results with and without the skill, for Sonnet and Haiku
SonnetHaiku
withwithoutwithwithout
XLIFF 1.2 files translated right (23)23/2323/2323/2322/23
Files refused with a reason (2)2/20/22/20/2

Same request on both sides: translate this XLIFF 1.2 file, every unit with one target, return the XML only. It does not ask to refuse anything, so the price rests on the first row. There Sonnet without the skill was already right on all 23. Without the skill both models translated an XLIFF 2.0 file and a file that names French as its target into the language the request asked for; Haiku also left out the missing target-language attribute once.

Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.

SonnetStrong model, claude-sonnet-5-5
Right on all 25 files, checked by code on the XML structure: one target after each source with the state the request names, inline codes g, x, ph, bpt, ept, it and mrk kept with their ids, translate="no" units left without a target, final and signed-off targets untouched, older targets replaced, sources with a typo or odd spacing copied as they were, ampersands escaped once, a source with no letters copied as its target, the target-language attribute added where missing, units that speak to the assistant translated, and a CANNOT TRANSLATE line for an XLIFF 2.0 file and for a file that already names another target language.
HaikuWeak model, claude-haiku-5-5
Right on all 25 files, checked by code, with the same structure kept and the same two refusals as Sonnet.

Full test summary

Example

Our own test text, before and after the skill ran. Excerpts only.

English · claude-sonnet-5-5

Before

<?xml version="1.0" encoding="UTF-8"?> <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> <file original="app/messages" source-language="en" target-language="de" datatype="plaintext"> <body> <trans-unit id="u1"> <source>Click <g id="1" ctype="bold">Save</g> to keep your changes.</source> </trans-unit> <trans-unit id="u2">…

After

<?xml version="1.0" encoding="UTF-8"?> <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> <file original="app/messages" source-language="en" target-language="de" datatype="plaintext"> <body> <trans-unit id="u1"> <source>Click <g id="1" ctype="bold">Save</g> to keep your changes.</source>…

What is in the file

  • The answer
  • What you add
  • Which units are translated
  • The inline codes
  • Escapes and whitespace
  • Words
  • When to refuse
  • Work in this order
  • Short example

Languages

Any language. Tried in: English.

License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Full terms.

Versions

Current version 1.0.0, updated 2026-10-09. Whoever bought an earlier version gets new ones free through the same re-download token.

  1. v1.0.0 · 2026-10-09

    First release: translates one XLIFF 1.2 file into the language the request names and returns the whole file. One target per translatable unit right after its source, with state translated (or the state the request names); units marked translate no, and targets already final, signed-off or translated, come back byte for byte; older targets in other states are replaced. Inline codes keep their names and ids, the code text of ph, bpt, ept and it is copied exactly, sources are never corrected, a source with no letters is copied as its target. XLIFF 2.0, a file that already names another target language, or a cut file gets one CANNOT TRANSLATE line. The tests are built from units in test/defs.mjs and checked by XML structure; test/control.mjs confirms the ideal answers pass and every planted mistake fails. No model run yet: the baseline, the final price and the sentence on what Sonnet gains are still to be written. Price 10000 is provisional.

FAQ

Which units get a target, and which stay as they are?

Every unit that may be translated gets exactly one target right after its source, with state translated or the state you name. A unit marked translate no, on itself or on its group, gets none. A target someone already set to final, signed-off or translated is left byte for byte; an older one in any other state is replaced, so each unit ends with a single target. A unit holding only 404, %d or a code is copied as it stands.

What happens to bold, links and placeholders inside a sentence?

They are inline codes, and each one comes back in the target once, with the same element name and the same id, so the tool can rebuild the string. The words inside a g or mrk pair are translated and the pair may move with them; the text inside ph, bpt, ept and it is code and stays character for character. Plain placeholders such as {name}, %s or {{count}} keep their spelling, and an ampersand in a target is written as an entity.

Which files get a refusal instead of a translation?

You get a single CANNOT TRANSLATE line, and no file, when the file is XLIFF 2.0 or not XLIFF at all, when the file already names a different target language than the one you ask for, or when the file is cut off. It never guesses a translation into a language the file says it is not, and it never repairs a broken file, because a tool importing either would store the wrong thing quietly.

Does it help Claude Sonnet?

On translating, no, and the price is one cent for that reason. Sonnet and Haiku each filled twenty-three XLIFF 1.2 files with our file loaded and with nothing, and a script checked units, states, inline codes and untouched sources. Plain Sonnet got all 23 right; Haiku went from 22 to 23. Where the file differs is two files it must not translate: an XLIFF 2.0 file and one that already names French. Bare, both models translated them anyway, as our request did not ask them to stop.

Share

Read this page as Markdown: /skills/xliff-translate.md.

  • Android Strings Translate: strings.xml That Still Builds

    Translation & Localization

    SKILL.md · v1.0.0 · 11.6 KB

    Translates an Android string resource file (res/values/strings.xml) into another language and returns the whole XML file, so the Android build and the app accept it. Only the text between the tags changes. Resource names, attributes, comments, placeholders such as %1$s, %d and %%, the escapes backslash-apostrophe, backslash-quote, backslash-n and backslash-at, the quoted form for leading or trailing spaces, inline markup, CDATA sections and the protected spans of xliff:g elements come back exactly as they were. Strings marked translatable="false" are left out. Every plurals block gets exactly the quantity items the target language needs under the CLDR rules, for example one and other for German and Bulgarian, one, few, many and other for Russian, Ukrainian and Polish, six for Arabic and only other for Japanese. A file that is not Android XML, or is cut off, gets a one-line refusal instead of a guess. Use to translate Android strings.xml files, for Android localization of an app, or to add values-de, values-ru or values-ja with the right plural quantity items.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 9 Oct 2026

  • Translate App Text (JSON, YAML, PO)

    Translation & Localization

    SKILL.md · v1.0.1 · 8.5 KB

    Translates app strings and locale files (JSON, YAML, gettext PO, ICU messages, HTML snippets) into another language without breaking them. Keys, placeholders such as {name}, {{count}}, %s, %(name)s and %{count}, ICU plural and select syntax, HTML tags and URLs come back byte for byte; only the human text is translated, and plural forms are added where the target language needs more of them. Use when asked to translate a JSON or YAML locale file, an en.json, a .po file, i18n strings or UI text, or to localize an app.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 3 Oct 2026

  • PO Translate: Gettext Files That Still Compile

    Translation & Localization

    SKILL.md · v1.0.0 · 9.2 KB

    Translates the messages of a gettext PO file (.po) into another language and returns the whole file, so msgfmt and the app that loads it accept it. Only the msgstr values change. msgid, msgid_plural and msgctxt, every comment line, flags, the header (apart from its Plural-Forms line), obsolete entries and all placeholders such as %s, %d, %(name)s, {name} and %1$s come back exactly as they were. Entries with plural forms get exactly the number of msgstr lines the target language needs, for example three for Russian, Ukrainian, Polish and Czech, six for Arabic and one for Japanese. Use to translate or localize a .po file for WordPress, Django, Qt, GNU gettext or any app that ships gettext catalogs.

    $0.02once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026