String Tables
In case you missed it, a String is the data type used for encoding text. Is is typically written surrounded by quotes, such as "Radical".
String Tables are how the Sims 4 stores text in a way that allows it to be easily translated into different languages. Sometimes abbreviated as stbl.
Storing a String
Section titled “Storing a String”A string is stored inside a string table as a key value pair, where the key is a unique ID (int) and the value is the string. The key is typically written as hex, and is how the string is referenced.
0xDF9A52E3 = "Radical"Localized Strings
Section titled “Localized Strings”A string table stores strings for a single language. However, when storing string translations inside a string table of a different language, the same key is used. This means string keys are language independent. Their value is automatically translated when selecting which string table to read from.
English Table { 0xDF9A52E3 = "Radical" 0xAE3713F9 = "This person is radical."}German Table { 0xDF9A52E3 = "Radikale" 0xAE3713F9 = "Diese Person ist radikal."}Repeat for all languages...Now 0xDF9A52E3 can be used to reference a language independent version of “Radical”, and the value can be updated by editing the string tables. That’s radical!
Even if you don’t translate your mod, you should still include string tables for all languages and fill them with untranslated values. If you don’t, text won’t appear for those languages.
String Table Linking
Section titled “String Table Linking”This step is handled automatically by tools like S4E and S4S.
String tables are linked to one another using matching instances, but their highest two hex digits encode the language. For example, 00 is English, 04 is Danish, and so on.
