Posts: 61
Thanks: 1202 in 25 Posts
7 Achievements
Most of the time if you want your strings to be localized, you'll need to add them to the string tables in a .package file and then reference them from your script.
The code below creates a reference to a string's instance id in your STBL. You are never able to actually see the raw string from the package in python. The ID will be passed to the client to be read from the package.
Code:
from sims4.localization import _create_localized_string
text = _create_localized_string(0xD8C9A18B)
You can however pass raw strings to the client, but they will not be localized to the game's language:
Code:
from sims4.localization import LocalizationHelperTuning
text = LocalizationHelperTuning.get_raw_text("My text here")