BrannigansLaw / Skyrim-Behavior-Editor-

WIP: A work in progress tool for viewing and editing the contents of Havok's "hk_2010.2.0-r1" hkx-xml behavior files.
MIT License
52 stars 16 forks source link

Multi languages support #3

Open ShikyoKira opened 6 years ago

ShikyoKira commented 6 years ago

Hey zartar, i have been thinking since this tool is going to be important for behavior editing, it would be great if we can make it supports multi languages so that not just english user can use, As of current, i feel kinda sad for non-english user.

My suggestion is to create a language pack (unicode text) with all the text, like i did for my tool. Modder can then translate all the text using the the english language pack as reference. So instead having all the text hardcoded into the tool, It will just be a pointer to all the text in the language pack. This is just what i would do. What do you think?

BrannigansLaw commented 6 years ago

Sorry, I've been busy and I missed this. I think Qt has some support mechanisms for translation of text. That said could you explain your approach in more detail for me?

ShikyoKira commented 6 years ago

Its ok. We all have that moment when we are too into our things that we just aren't "distracted" by other things.

anyway, let me get into it now. This can be done by adding a map container into the UI form class. This map container will be filled with text from a file like this. To access it, you can simply do something like CRITICAL_ERROR_MESSAGE(1015), using the map container and the code (1015) as key, it will print out "Add-on contain invalid characters, only alphabet is accepted. Please contact the template creator". This can also be done for the text in all the ui forms.

Changing the language can be done by refreshing the map container or using other map container containing text in other language, after that refresh all the ui items

BrannigansLaw commented 6 years ago

Thanks for the explanation. I'm very busy at the moment but I'll definitely do something about it when I find the time.