Localizing JSON, XLIFF, PO and RESX Files: Formats Explained
JSON, XLIFF, PO and RESX all store the same thing, pairs of keys and text, but each has its own rules for plurals, comments, placeholders and escaping.…

Short answer: JSON, XLIFF, PO and RESX all store the same thing, pairs of keys and text, but each has its own rules for plurals, comments, placeholders and escaping. JSON is common in web apps, XLIFF is the industry exchange standard, PO comes from gettext, and RESX belongs to .NET. Choose the one your framework uses, then protect its syntax during translation.
Every localized product eventually becomes a pile of resource files. Developers rarely think about them until something breaks: a translated JSON file fails to parse, an Arabic plural is missing, or a placeholder comes back renamed. Most of these problems have nothing to do with language and everything to do with format. This guide explains the four formats software teams send to translators most often, what each one looks like, where it goes wrong and how to prepare it so translations come back clean.
Why the file format matters for translation
A resource file mixes two kinds of content: text that should be translated and structure that must never change. The structure includes keys, attributes, placeholders, markup and escape characters. Translators work in computer-assisted translation (CAT) tools or a translation management system that parses the file, shows only the translatable text and protects the rest. That only works if the parser understands your file.
Problems usually come from three places:
- The parser is not configured for your conventions, so placeholders such as
%1$sor{{name}}are shown as plain text that a translator can edit or delete. - The format cannot express what the language needs, such as six Arabic plural forms in a file that only allows singular and plural.
- Context is missing, because the format supports comments but nobody wrote any.

The four formats at a glance

| Format | Typical use | Comments for translators | Plural support | Main trap |
|---|---|---|---|---|
| JSON | Web and JavaScript apps (i18next, react-intl, vue-i18n) | Not native; needs a convention or separate file | Via library conventions or ICU messages | Escaping and invalid syntax |
| XLIFF | Exchange format; Apple and Angular exports | Yes, notes per unit | Depends on the producing tool | Version differences (1.2 vs 2.x) |
| PO (gettext) | PHP, Python, C, WordPress, Linux apps | Yes, extracted comments and references | Yes, native plural forms per language | Wrong plural header for the target |
| RESX | .NET applications | Yes, a comment element per entry | No native support | Non-text resources mixed with strings |

JSON
JSON is the default for most web front ends. A flat or nested object maps keys to strings:
{
"cart": {
"title": "Your cart",
"items": "{count, plural, one {# item} other {# items}}",
"greeting": "Hi {{name}}, welcome back"
}
}
What goes wrong. JSON has no standard plural or comment syntax, so every library invents its own. i18next uses suffixed keys such as items_one and items_other; other libraries embed ICU MessageFormat inside the string. A translator who sees raw ICU text without guidance may translate the keywords plural or other, which breaks the message. Unescaped double quotes in the translation make the whole file invalid.
How to prepare it. Tell your vendor which library and placeholder style you use, so the parser can lock {{name}} or {count}. If you use suffixed plural keys, make sure the target file will contain every plural category the language needs. For Arabic that means zero, one, two, few, many and other, as defined by CLDR. Keep context in a separate descriptions file or in the TMS if your library has no comment convention.
XLIFF
XLIFF (XML Localization Interchange File Format) was designed for translation exchange. Each unit holds a source, a target and optional notes:
<trans-unit id="checkout.pay" maxwidth="20">
<source>Pay now</source>
<target></target>
<note>Button on the payment screen. Keep short.</note>
</trans-unit>
What goes wrong. There are two main versions in use, 1.2 and 2.x, with different element names. Tools that produce XLIFF (Xcode localization exports, Angular's extraction tool and others) each add their own conventions. Inline placeholders may be represented as special elements; if they are converted to plain text along the way, they lose their protection.
How to prepare it. Send the file exactly as your tool exported it and say which tool produced it. Do not "clean up" XLIFF by hand. Use the note element for context and, where the producing tool supports it, length limits. When files come back, re-import them with the same tool and check the result in the build.
PO (gettext)
PO files come from the GNU gettext system and are widely used in PHP, Python and WordPress. The source text itself acts as the key:
#. Shown after the user deletes a file
#: src/files.py:88
msgid "File deleted"
msgstr ""
msgid "%d file"
msgid_plural "%d files"
msgstr[0] ""
msgstr[1] ""
What goes wrong. The number of msgstr[n] entries is controlled by the Plural-Forms header. If the header is copied from English, an Arabic file will only have two plural slots instead of six. Because the source text is the key, fixing a typo in English invalidates every translation of that string. Fuzzy entries (marked #, fuzzy) are often ignored at runtime, so text that looks translated may not appear.
How to prepare it. Generate target files from the POT template with the correct header for each language. Use extracted comments (#.) to explain short or ambiguous strings. Agree with your vendor how fuzzy entries should be handled before delivery.
RESX
RESX is the XML resource format used by .NET. Each entry has a name, a value and an optional comment:
<data name="LoginError" xml:space="preserve">
<value>Incorrect password. {0} attempts left.</value>
<comment>{0} is a number</comment>
</data>
What goes wrong. RESX files can contain images, file references and other non-text resources next to strings, and these must not be touched. There is no native plural mechanism, so developers often build sentences from pieces, which rarely translates well. Numbered placeholders like {0} are easy to lose or reorder incorrectly.
How to prepare it. Send only the neutral-language file and let the tool create the culture-specific files, such as Strings.ar.resx. Use the comment element to explain every placeholder. Where a sentence depends on a number, consider moving to a library that supports ICU plural rules.
A typical case: a team sends a set of resource files in mixed formats, some JSON with ICU plurals and some older PO files with an English plural header. Before translation, our engineers configure the parsers so every placeholder is locked, regenerate the PO headers for each target language, and add plural slots so Arabic gets all six forms. Linguists then see only translatable text, and the files go back through automated checks before delivery.
Other formats you will meet
- Android XML (
strings.xml) with<plurals>elements and apostrophes that must be escaped. - Apple string catalogs and .strings / .stringsdict files for iOS and macOS, managed through Xcode.
- YAML in Ruby on Rails and some static site generators, where indentation is part of the syntax.
- ARB in Flutter, a JSON-based format with metadata entries for descriptions and placeholders.
The same rules apply to all of them: know which parts are structure, lock them, and give translators context. Our guide to iOS and Android app localization covers the mobile formats in more detail.
A checklist before you send files
- Send the original files, not copies pasted into a spreadsheet.
- Tell the vendor which framework and placeholder syntax you use.
- Add comments for short, ambiguous or concatenated strings.
- Check that plural handling supports every category the target language needs.
- Remove dead keys so nobody pays to translate them.
- Agree on encoding (UTF-8 is the safe default) and line endings.
- Plan a validation step: parse every returned file in CI before merging. This is a core part of continuous localization.
Our engineers work with JSON, XML, XLIFF, PO, RESX and many other formats, and build custom parsers when a format is not supported by standard tools. Read about our localization engineering work, explore our web and software localization service, or get a quote by sending a sample file.

Frequently asked questions
Which localization file format is best?
There is no universal best. Use the format your framework supports natively, because conversion adds risk. What matters most is support for comments, placeholders and the plural rules of your target languages.
Should I convert my files to XLIFF before translation?
Usually not. Modern translation tools read JSON, PO, RESX and mobile formats directly. Converting to XLIFF yourself only helps if your vendor's tools cannot parse your native format, and a good vendor will handle that conversion for you.
Can translators work in a spreadsheet instead?
They can, but it removes placeholder protection, translation memory and automated checks. Copying text into and out of spreadsheets is one of the most common sources of broken files.
How do I handle Arabic plurals in JSON?
Use ICU MessageFormat or your library's plural key convention, and make sure the Arabic file includes all six CLDR categories. Libraries such as i18next resolve the right form at runtime based on the number.
What encoding should localization files use?
UTF-8 is the safe default for almost every modern format. Older Windows tools sometimes produce other encodings, so state your expectation clearly and validate files on return.
Keep reading
All articles
Software Localization Services: Process, Cost and Timeline
software localization services adapt your product's interface, help content, store listings and legal pages for users in another language an...
Read the article
SaaS Localization: How to Enter a New Market Without Rebuilding
SaaS localization means adapting your web app, onboarding, emails, billing, help center and legal pages for a new language and market withou...
Read the article
App Localization for iOS and Android: A Step-by-Step Guide
to localize an iOS or Android app, move every user-facing string into the platform's resource files, handle plurals and formatting with syst...
Read the articleSend the file. A project manager replies in thirty minutes.
A first reply within 30 minutes in office hours. On time, or refunded. A free review if you are not satisfied.
