Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Pettifogging Legalist!
retired moderator
Original Poster
#1 Old 8th Jan 2016 at 12:48 PM Last edited by justJones : 6th May 2018 at 11:08 PM.
Default How to translate an existing mod (STBL editing)
This is a simple way to improve a mod that is not available in your language, showing English text instead. If you come across a mod where strings are missing entirely (resulting in ***DEBUG*** or no text being shown), you can also repair it this way. Either just for yourself, or even better, for everybody ‒ most creators will probably appreciate when you post additional strings for their uploads (it’s hardly possible to properly localise a mod when you don’t have the game installed in the target language, so that is something that usually requires the help of others).


STBL IDs and locale codes:

Strings ( = bits of text that the game is using to show in the interface) are stored in string tables, type 0x220557DA (STBL). These resources usually come in bundles, numbered like this:

0x220557DA-0x80000000-0x002505EF3F075A02
0x220557DA-0x80000000-0x012505EF3F075A02
0x220557DA-0x80000000-0x022505EF3F075A02
..
0x220557DA-0x80000000-0x152505EF3F075A02

The numbers in bold are the locale code, which is how the game tells apart the different languages ‒ 07 is the locale code for French for example; if you have the game installed in French it will look for the STBL where the ID starts with 07 and use the strings from that.


Maxis have also posted the locale codes and some other info on STBL here.


Context:

It is probably a good idea to use the untranslated mod at least once before you edit it, so that you can see how the strings are being used in game ‒ for instance, with the mod I’m using for this example, you couldn’t tell what the difference between “Prepare” and “Serve” ought to be just from looking at the package by itself (but when you’ve used it in game, you might have noticed that when a sim makes a single meal, it’s called “Prepare Suchandsuch”; the group meals have “Serve suchandsuch” instead. This differentiation may not exist in all languages.).


How to edit the strings in a package:

1. Open the package in s4pe

2. On the left-hand side, you see a list of resources in this package; scroll to the STBL resources (you can click on Tag/Type/Group etc at the top to sort the list) and find the one with your locale code ‒ 08 in this case, which should be German but is obviously not, as you can see in the preview on the right side

3. Click on the “Grid” button at the bottom of the window; in the little window that opens, click on the three dots

4. Now you have the data grid in front of you, again with a list of contents on the left, and the actual content (key/value pairs) on the right. To enter your translation, simply overwrite the text in “Value” (don’t mess with the “Key” field, that needs to remain unchanged). The text can contain stuff like “\n” which is a newline character, or text variables like “{0.SimFirstName}” or “{F1.she}{M1.he}” (this will be replaced by the name of the active sim / the pronoun that matches the sim’s gender); those should not be changed. Some creators also have URLs in there that shouldn’t be edited out ‒ they are important for users to be able to tell where they got a mod from.

5. When you have entered the translated text in all fields, hit “OK”, then “Commit”. The preview on the right should now show your translated text.

6. If you want to post this translation somewhere, right-click on the resource that you edited > Export > To File. Save it somewhere, zip it and post it.

7. Save the package (File > Save) and you’re done.


If you need the game strings in various languages for reference, some have been posted in this thread.

Also, for managing a lot of languages there are tools like this ‒ but that looks more useful for people who actually create a mod, rather than edit just one language.
Screenshots

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
7 users say thanks for this. (Who?)
Advertisement
Test Subject
#2 Old 22nd Jan 2016 at 11:42 AM
Hallo, I need help...
Why my GRID isn't enabled and the descriptions say?:
Error reading resource 0x220557DA-0x80000000-0x0B3AD36FDEC973CE
Front-end Distribution:
Library Distribution:

Source: s4pi.WrapperDealer
Assembly: s4pi.WrapperDealer, Version=1509.15.616.13102, Culture=neutral, PublicKeyToken=null
Could not find a resource handler
What missing?
Thank's very much
Easybe
Pettifogging Legalist!
retired moderator
Original Poster
#3 Old 22nd Jan 2016 at 12:09 PM
How/where are you getting this error? Is this an existing STBL that you are trying to edit? If yes, some CC has STBLs with incorrect length information -- the game doesn't care but the current version of s4pe doesn't display that. Is fixed in the next version but that is not published yet.

You could try two things: either use the STBL editor from here http://modthesims.info/download.php?t=564576 , see if that can read it, or if you know the keys you need, you can also add a new STBL and delete the existing one.

Also, make sure you unzip s4pe with 7zip, not with winrar.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Test Subject
#4 Old 22nd Jan 2016 at 6:14 PM
Thanks for your reply.
I have unzipped s4pe with winrar, sorry...
I search 7zip and i try again.
I would update my cc mods with italian language, like you have shown, but for me is all new.
your instructions are very good.
thanks
Pettifogging Legalist!
retired moderator
Original Poster
#5 Old 22nd Jan 2016 at 9:32 PM
Since you say "cc mods" -- if those are objects, you can see the keys for name and description in the COBJ resource (NameHash, DescriptionHash; right at the top of the preview). So if you can't manage to open the STBLs you can simply create one, and put two entries with those keys in there.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Test Subject
#6 Old 23rd Jan 2016 at 2:54 PM
Now i can modify the language because the program it's ok, but i have into my folder mods some objects that give me error.
is possible to correct this objects? if the procedure isn't very hard, you can teach me?
thanks very really
Pettifogging Legalist!
retired moderator
Original Poster
#7 Old 23rd Jan 2016 at 4:03 PM
See the above post. If it's only the object name and description you want to translate, you can see the keys in COBJ. Make a new STBL with your language code, add strings for those keys, and delete the old STBL. You probably shouldn't do this with objects that have custom functions etc (more text than just name and description), try the STBL editor that I've linked to several times now.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Test Subject
#8 Old 23rd Jan 2016 at 6:16 PM
wonderful, I have tried and I done center.
Thanks, now I have understood and so I can work very well
Pettifogging Legalist!
retired moderator
Original Poster
#9 Old 9th Feb 2016 at 4:03 AM
Quote: Originally posted by plasticbox
some CC has STBLs with incorrect length information -- the game doesn't care but the current version of s4pe doesn't display that. Is fixed in the next version but that is not published yet.


This is published now: https://github.com/s4ptacle/Sims4To...tag/v0.4.2-beta

Several updates/fixes for STBL; should make it easier to deal with STBL resources that are mangled in some way.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Test Subject
#10 Old 23rd Aug 2017 at 3:47 PM
Thanks, this was really helpfull. I was wondering, what if you need to translate a sentence for both genders? If you know what I mean.
Test Subject
#11 Old 24th Mar 2020 at 7:59 AM
Someone by any chance have all the "{.}" of the game? I need them separately if can -I'm not a modder :,D
I specifically need to mention the spouse of a sim with the gender alternatively... because is spanish.
Test Subject
#12 Old 8th Jun 2020 at 10:38 PM
thanks , is there a way to automatically translate it ? i have huge a package with about more than 600 text
Back to top