Creating Localization Files for Steam Workshop

Tools needed:
Minimaul’s Saints Row IV Tools

Minimaul’s Workshop Upload Tool
Any text editor (preferably Notepad++)

First, create a new file in the text editor of your choice and paste this template into it:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Strings Language="English" Game="SaintsRowIV">       

</Strings>
If you aren’t creating strings for the English version of Saints Row IV, adjust the value of the language variable. For example, if you want to make Polish localization files, change “English” to “Polish” in the second line.

xmlTemplate.PNG


For every string you want to add, paste this line once between the “Strings” tags:
Code:
<String Name=""></String>
Now you need to specify the respective string’s name and value. The name goes between the quotation marks and can be used in other game files to reference this string. Obviously, the value has to be written between the two “String” tags. This is what will be displayed in-game.

Let’s pretend you’re making a string for the alien tank cheat from Idol’s table file tutorial. For that, you need to specify your string’s name as whatever the “DisplayName” variable in his table was set to, ergo “DROP_MISSION_TANK”. For the value, come up with a name for the cheat.

dropMissionTank.PNG


Once you’re happy with your strings, simply save your file as an XML and name it according to SRIV’s naming conventions for localization files. That is to say, the file name has to end with “_xx”. Replace xx with language abbreviations such as "de", "ru", "us" etc. Here's the full list:

Vanilla localizations:
US - English
DE - German
ES - Spanish
FR - French
IT - Italian
PL - Polish
RU - Russian
JP - Japanese

Hacky localizations that don't load by default:
NL - Dutch
SE - Swedish
DK - Danish
CZ - Czech
SK - Korean
CH - Chinese

If you set the language variable to “Polish”, the file should end with “_pl”. Additionally, the file shouldn’t be named exactly like an already existing localization file. A good way to make sure of that is to include your username.

fileName.PNG


Drag and drop your XML onto “ThomasJepp.SaintsRow.BuildStrings.exe”. This will create a new LE_STRINGS file in your XML’s directory. Finally, upload the LE_STRINGS file along with your other mod files. Here’s a tutorial on how to do that:
https://www.saintsrowmods.com/forum/threads/saints-row-iv-steam-workshop-uploader-beta-12.14114/

TIPS:

It’s recommendable to always add an English version of your localization file to your mod. That’s because missing localizations will be replaced by English strings if those exist.

If you created a new customization item using Minimaul’s clone tool, it already created template XMLs for you and stored them in a folder called “stringxml” in your mod’s directory. Those templates come with the right string names already, so you can simply adjust the string values.

Formatting Strings
If you want to have a little more control over how your text looks in-game, this section is for you. There’s a total of 5 tags you can use to format strings in Saints Row IV:
Code:
[format] & [/format]
[color:]
[scale:]
[image:]
The “format” tags are used to wrap the text you want to change the looks of. The “color” and “scale” tags affect the text they’re wrapped together with. Here’s an example:
Code:
<String Name="BIG_RED_STRING">[format][color:red][scale:2.0]This is a big red string![/format]</String>
As you can see, the “scale” tag takes a decimal number as an argument. In this case, the formatted text would be twice as big as usual. The “color” tag lets you specify the color of the text, either by name or by hex code. Below is a list of all valid color names and the corresponding RGB values:

ListOfColorNames.PNG


However, I recommend using the color tag with hex codes, since that allows you to make use of all 16,777,216 colors known to web designers. Here’s a link to a color picker in case you don’t know all hex codes by heart (shame on you): www.colorpicker.com

Last but not least, you can add in-line images to your strings by passing their names to an “image” tag. However, it only works with names of bitmap sheet entries and there’s currently no way to add those through Steam Workshop.

Here’s an example of formatted main menu strings, provided by Minimaul:

moddedMainMenuXML.PNG


moddedMainMenu.png
 
Last edited:
Ok so I am willing to make a brazilian localization for Saints Row IV (and other games as well).

Since this is my very first time dealing with modding, I had to learn on how to use Notepad++ and strictily follow your steps. With a basic but very helpful help of IdolNinja, I was able to sucessfully build my strings for the first time. As a trial, I have only translated the Main Menu options for now.

However, nothing changed on the game after subscribing to my own mod. I really don't know what to do next. What should I do? I'll attach my file so you can see it if there' something wrong in there.
 

Attachments

  • traducao_menu_sr4_us.le_strings
    528 bytes · Views: 885
Ok so I am willing to make a brazilian localization for Saints Row IV (and other games as well).

Since this is my very first time dealing with modding, I had to learn on how to use Notepad++ and strictily follow your steps. With a basic but very helpful help of IdolNinja, I was able to sucessfully build my strings for the first time. As a trial, I have only translated the Main Menu options for now.

However, nothing changed on the game after subscribing to my own mod. I really don't know what to do next. What should I do? I'll attach my file so you can see it if there' something wrong in there.
That file is empty - it's only 528 bytes!

Attach your original .xml file to the forum and I'll take a look.
 
There you go - Thanks for the help!

I guess I uploaded the wrong file accidentally. Sorry for that. Double chacked this one. The strings are definitely there!
 

Attachments

  • traducao_menu_sr4_us.xml
    556 bytes · Views: 807
OK, I was wrong - that tiny an XML file *does* produce a strings file that small. (oops!)

This may be something you just can't do using the workshop at present.

I tested it and it works if I rename it to "menu_us.le_strings" and put it in the game's root directory, though.
 
OK, I was wrong - that tiny an XML file *does* produce a strings file that small. (oops!)

This may be something you just can't do using the workshop at present.

I tested it and it works if I rename it to "menu_us.le_strings" and put it in the game's root directory, though.

Hum... Can't find any other files files like these on game's directory. How should I proceed to translate all the game's text?

I tried renaming and it worked, however I can see that the game skipped words with accents - like in the "Opções" (Options) button. Looks like the game also didn't recognized some of the lines.
8vv87By.jpg
 
Last edited:
https://saintsrowmods.com/search/Files/Results?game=3&searchTerm=_us.le_strings - this lists all of the English language strings in the game. If you unpack those packfiles (using ThomasJepp.SaintsRow.ExtractPackfile or ThomasJepp.SaintsRow.ExtractPackfileGUI and then use ThomasJepp.SaintsRow.ExtractStrings on each of those files, you'll get a .xml file containing strings you can translate - then convert back to a .le_strings file using ThomasJepp.SaintsRow.BuildStrings.

You'll see some of the files are in the list twice - they're in both misc.vpp_pc and patch_compressed.vpp_pc. For these files, the version in patch_compressed.vpp_pc is the one to use.

Once you're done translating each file, just drop the converted .le_strings file into the same directory as SaintsRowIV.exe with the same name that it originally had - so if it was originally "menu_us.le_strings" and you converted it to "menu_us.xml" to translate the strings, then once you convert it back to a le_strings file it should also be called "menu_us.le_strings".
 
https://saintsrowmods.com/search/Files/Results?game=3&searchTerm=_us.le_strings - this lists all of the English language strings in the game. If you unpack those packfiles (using ThomasJepp.SaintsRow.ExtractPackfile or ThomasJepp.SaintsRow.ExtractPackfileGUI and then use ThomasJepp.SaintsRow.ExtractStrings on each of those files, you'll get a .xml file containing strings you can translate - then convert back to a .le_strings file using ThomasJepp.SaintsRow.BuildStrings.

You'll see some of the files are in the list twice - they're in both misc.vpp_pc and patch_compressed.vpp_pc. For these files, the version in patch_compressed.vpp_pc is the one to use.

Once you're done translating each file, just drop the converted .le_strings file into the same directory as SaintsRowIV.exe with the same name that it originally had - so if it was originally "menu_us.le_strings" and you converted it to "menu_us.xml" to translate the strings, then once you convert it back to a le_strings file it should also be called "menu_us.le_strings".

Thank you very much! Now I have a direction to start. I'll translate everything and post my early results here. Or should I create a separate thread? I am really excited and willing to learn and do this right. However, since I'm a total beginner, I will really need some help from you guys. I really do appreciate.
 
Update: ThomasJepp.SaintsRow.ExtractStrings does not work for me. I've downloaded the latest build and when I try to open any le_string file, it opens and closes in a fraction of a second. No new files or changes have seem to be made.

ThomasJepp.SaintsRow.ExtractPackfileGUI seems to work fine.

Can you please take a look on this?

Edit: Just added you on Steam. please accept me se we can make this more easily
 
Thank you very much! Now I have a direction to start. I'll translate everything and post my early results here. Or should I create a separate thread? I am really excited and willing to learn and do this right. However, since I'm a total beginner, I will really need some help from you guys. I really do appreciate.
You need to run it in a command prompt as it needs to be told which game the file is from (and yes, this really matters).

So you'd do something like:
Code:
ThomasJepp.SaintsRow.ExtractStrings sriv menu_us.le_strings
 
Back
Top