I’m writing a localization system from scratch. For the simplest stuff I have a file, Localization.ini, that contains a bunch of translated strings that the game can look up. I use it for messages like “Critical Hit!” and “Level Up!” I even use it for translating terms on the character sheet. But I’m going to need a lot more than that. I think I know what I need to do, and I know how to do all of it except the last step here:
- All actors in the game world that have string properties in need of localization write to a json file that I can later update manually with localizations of all their strings.
- Do the same for all Kismet nodes (which I use for my dialog system) that have string properties in need of localization, likewise populating a json file.
- Do the same for all archetypes saved in my game’s upk files, creating a json file where I can enter localizations.
The idea is that any time I want to access a string property in a placed actor, a Kismet sequence action, or an archetype, I will look up said actor, sequence action, or archetype in the appropriate json file, and get the localized string from there. I just need to create the files. I’m pretty sure I can get the data I need from the first two bullet points above. But I have no idea how to get a list of packages and iterate through the content of those packages.