Works on this device
Translation File Editor
Open a translation file of your app or website and work on it in this browser. The page shows each source text beside its translation, marks missing, empty and fuzzy translations and placeholders that differ, lets you edit the entries and writes the file again in its own format. It reads gettext PO and POT files, XLIFF 1.2 and 2.0, and JSON files with nested or flat keys.
Your translation file
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose the button below them.
Your translation file
How it was worked out
How to use this editor
- Choose Open a translation file and check it. Paste the file or open it from your device. For JSON, add the file of the language you translate from; for PO, you can add the POT template.
- Choose Check. The table shows the source and the translation side by side, with what to look at in the Result column.
- Choose Edit these entries under the result. The entries move into rows. Change the translations, tick or untick Fuzzy for PO, and choose Write the file.
- Download the file. Only the translations you changed are written again: comments, order and the other lines stay as they were.
- For a large file, use Convert to CSV and back and edit the CSV in a spreadsheet. For a PO file, Make an MO file or read one makes the compiled MO file that programs read.
The formats
- gettext PO and POT: entries with comments (#, #., #:, #, flags, #| previous), msgctxt, msgid, msgid_plural and msgstr or msgstr[0], msgstr[1] ..., as the GNU gettext manual describes them. Texts are shown without their PO escapes; the key of an entry is its msgid with escapes such as
\nfor a line break. Obsolete entries (#~) are kept as they are. - XLIFF 1.2 and 2.0: the units (trans-unit or unit) with their source, target and notes. The key is the unit id. Texts are shown exactly as they are written between the tags, so inline tags such as
<x id="1"/>and references such as&stay. A unit with translate="no" is left out. - JSON: one object whose text values are the translations. A group of keys inside it makes a key path with dots, such as
menu.file.open. The file keeps its own order of keys and its indent. - CSV: the columns Key, Context, Form, Source, Translation, Fuzzy and Note, to edit in a spreadsheet and read back.
- MO: the compiled file of gettext, made from a PO file, with the texts in UTF-8.
What the checks find
- Missing: a key of the source file that the translation file does not have, an XLIFF unit with no target, or a POT entry that the PO file does not have.
- Empty and Fuzzy: an empty translation, or a PO entry marked fuzzy (it needs review, and programs do not use it).
- Placeholders differ: printf placeholders such as
%s,%dand%1$s(in the same order unless they have positions),{name}and the argument names of ICU messages such as{count, plural, ...},{{name}}if you choose, and tags such as<b>or<x id="1"/>. - Same as the source: a translation that is the same as its source text. It is fine for a name, but it often shows a text that was not translated.
- Not in the source file or Not in the template: keys that only the translation file has.
- Coverage = translated entries ÷ entries, where a translated entry is not empty and not fuzzy.
Worked example
The example English file has 6 texts. Its French file has the title in English, the {name} placeholder of the welcome text changed to {nom}, an empty text, no "save" key and one key the English file does not have. The check finds 6 entries: 4 translated (a coverage of 66.7%), 1 missing, 1 empty, 1 with different placeholders, 1 the same as the source and 1 not in the source file.
In the example PO file, the entry "One bed" has msgstr[1] empty. Typing %d planches in its row and writing the file changes only that one line. As an MO file, the example has 3 entries (the header, "Save" and "Open" with its context): the fuzzy entry and the 2 untranslated entries are left out.
Limits you should know
- Nothing is translated by a machine, and nothing is sent anywhere. The files are read and written in this browser.
- The editor takes up to 1,000 entries; use CSV for larger files. A pasted or opened file may have up to 2 million characters, and the coverage check takes up to 50 files of up to 2 MB each.
- XLIFF targets are changed, and new targets added, but units are not added or removed and attributes such as state are not changed. The XML is checked to be well-formed; it is not checked against the XLIFF schema.
- PO files are read as UTF-8 text unless you choose another encoding when you open the file. Escapes of bytes above 127 (octal or \x) are not read.
- Android strings.xml and iOS .strings files are not read here.