XaiJu
derNeonLeon
derNeonLeon

patreon


Automatically translate Sims 4 mods and update outdated translations

In this post I want to show you how to create translation mods and update outdated translation mods.

Video Tutorial: https://youtu.be/M0dyIW6J-g0 

I'm sure many of you already work in a similar way, but for those of you who are not yet familiar with this method, I've created this tutorial! In my opinion, this is the best way to merge an existing translation with new, previously untranslated text from an updated mod. This way you can translate the new sections automatically and don't have to copy and translate the individual elements of the string table manually.

To get started, please download the following tools: DP STBL Editor, S4PE and the Sims XML Auto Translator. A big thanks goes to UmaruMG for the XML Auto Translator without him the project would not have been possible! An installation of these tools is not necessary, because they can be started directly from their respective folder.

In the first step (A.) I explain how to create a completely new translation.

In the second step (B.) I show you how to adapt an already existing translation to a new update.




A. CREATE A COMPLETELY NEW TRANSLATION

1. Open the STBL editor and navigate to "File" > "Open From Package". Select the mod/.package file you want to translate.

2. Select the string table of the language you want to translate. If there is only English, open it and remember to change the language later when saving!

Now all string entries of the selected language should be visible, like on the following screenshot:

3. In the STBL Editor you can edit the texts directly. To do this, double-click on the line that you want to translate. For automatic translation, export the string table via "File" > "Export to XML".

4. Launch the Sims XML Auto Translator. With this tool you can translate the exported XML automatically. For best results we use the DeepL API, for which you need an API key from DeepL. You can get it here: DeepL API (unfortunately a credit card is required for verification).

After you have entered the API key, you are ready to go.

Use "Import XML" to import the XML previously exported with STBL Editor. Then select the "Input Language" and "Output Language". After that you can export with "Export XML". Make sure that the input and output language are set correctly, otherwise DeepL can't work properly! And so you can translate a mod automatically in a few seconds. Now we import the translated strings.

5. In the DP STBL Editor you import the translated XML via "File" > "Import XML" and then save under "File" and "Save". The mod will be saved in the same folder where the DP STBL Editor is located. If we selected English in step 2, click under "File", "Save as" and select the language you translated into.

Note: Please do not send STBL files to mod developers unless they explicitly ask for it.

6. Open S4PE and create a new package by navigating to "File" > "New". Import the previously created STBL file (with the translation) by right-clicking and selecting "import" > "From file...". Then confirm with "OK". Save the file as .package via "File" > "Save As...". Make sure that the name of the new translation mod starts with a "!". Without the "!" at the beginning the translation mod will be loaded after the untranslated mod and will not work!

And done!



B. UPDATE STRING TABLE ON MOD UPDATE

1. Open the DP STBL Editor, click on "File" > "Open from Package" and search for the new mod version with the untranslated text. Open the stringtable for the language you want to translate. Save this table via "File" > "Save As". By default the save location is the folder where the DP STBL editor is located. Then move the file directly to another folder named after the mod version, otherwise the mod will be overwritten in the next steps.

2. Click under "File" on "Open" and select the STBL file of the previous translation mod version. If you don't have this file, click on "File" > "Open from Package" and select the older mod version with the translated text.

3. In the DP STBL Editor, click under "Tools" on "Create Difference XML".

4. in the window that opens, under "STBL For Comparison", select the new mod version (the STBL you saved in the first step)

5. Click on the three dots at "XML To Save Results" and specify a location. Specify a file name for the XML file. This XML file will contain only the new text added by the update. After clicking "Ok" in the above window, the following message appears:

NOTE: It is important that you first open your old translation in the STBL editor and use the .STBL file of the newer version with the untranslated text for the "Comparison". The program will create an XML file containing only the new strings.

6. Next, open the Sims XML Auto Translator. With this tool you can automatically translate the exported XML using the DeepL API. To use the tool you need an API-key from DeepL. You can get it here: DeepL API (unfortunately a credit card is required for verification).

After you have entered the API key, you are ready to go.

With "Import XML" we can import the XML we exported in STBL Editor. After that select language and export with "Export XML". And with that a complete mod is automatically translated within seconds. Now you can import the new strings.

7. Switch back to the DP STBL Editor. Click on "File" > "import XML" and load the XML file created with "Sims XML Auto Translator". The new translated texts will now be imported and merged with the old translation.

The imported texts are displayed in bright yellow.

Read the translation again and make changes if necessary. When you are done, save the file as STBL. Again, be careful not to send STBL files to modders unless they ask for them. Then click on "File" > "Save" at the top to export the database as STBL.

6. Start S4PE. Either open the old translation mod via "File" > "Open..." and update it by replacing the single stringtables or create a new package via "File" > "New". Import the previously saved STBL file (with translation) via right click > "import" > "From file...".

Then save the file as .package via "File" > "Save As...". Make sure that the name of the new translation mod starts with a "!". Without the "!" at the beginning the translation mod will be loaded after the untranslated mod and will not work!

Done!

Automatically translate Sims 4 mods and update outdated translations

More Creators