LiveSplit.VideoAutoSplit
LiveSplit.VideoAutoSplit copied to clipboard
Add translation support
Not super sure how to go about doing that.
So, I think we basically just create a helper class that will take the configured language and return us the translation for that if we have it, otherwise, return english. Usually this might be based on an xml file with all the different versions, or a JSON file for each language.
Then we need to go into all the places we have hardcoded words for things and replace it with calls to that helper class.
I am not fluent in any language besides english but I could at least help with getting the helper class put together.
will logs also be in another language? It might be a bit weird. If anything I say, always include english at the end of logs, so that we can get the information needed to help with errors or bugs that are popping up there.
Errors should have codes attached to them to identify what it is regardless of language.
Haven't made anything like a Helper class for translations before. I don't think a separate XML/JSON would be necessary, especially since AFAIK no other component does that for translations. It can be added inline.
Using a separate XML/JSON would mean people can easily add in translations without a rebuild and help build out the language.
But we can keep this on the backburner as things progress it can always be added
first things first, where will the setting exist to change the language? We can put together a branch with that option in it and then work on the structure needed to have dynamic language, and find people to help translate things properly