Guides/07
Strings
Dump, localize, edit and translate the strings of a plugin.
A localized plugin keeps its text in .STRINGS, .DLSTRINGS and .ILSTRINGS files.
esx reads these tables from loose files and from archives.
Dump
esx strings dump MyMod.esp
Each entry shows the record, the path, the table, the string ID and the text.
Localize
esx strings localize MyMod.esp
esx strings delocalize MyMod.esp
localize moves the inline strings into string files and sets the localized flag.
delocalize puts the strings back into the plugin and clears the flag.
Edit one entry
esx strings set MyMod.esp strings 55690 'New text'
If the table is inside an archive, strings set writes the complete table as a loose override.
Other string IDs in the table stay the same.
Translate
esx strings export MyMod.esp -o translation.json
esx strings import MyMod.esp translation.json --dry-run
esx strings import MyMod.esp translation.json -o Translated.esp
strings export writes each text field of the plugin into one JSON file. Change the text of each item and keep the other fields.
strings import checks that the source text and the field of each item are the same as in the plugin. If one item does not agree, it saves nothing.
You can remove items from the file to translate only a part.
To write the tables of a different language, the plugin must be localized. Then give the language:
esx strings import MyMod.esp translation.json --target-language ru -o Translated.esp
--language selects the tables that esx reads. --target-language selects the file names and the text encoding of the output.
Fallout 4 uses Windows-1252 for English and UTF-8 for the other languages.
Where strings come from
esx looks for string files in this order:
- Archives from the game INI and the custom INI.
- Archives that belong to the plugin.
- Archives you pass with
--archive. - Loose files.