LiveSplit.VideoAutoSplit icon indicating copy to clipboard operation
LiveSplit.VideoAutoSplit copied to clipboard

Add translation support

Open ROMaster2 opened this issue 6 years ago • 6 comments

Not super sure how to go about doing that.

ROMaster2 avatar Dec 20 '18 05:12 ROMaster2

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.

kenman345 avatar Jan 14 '19 20:01 kenman345

I am not fluent in any language besides english but I could at least help with getting the helper class put together.

kenman345 avatar Jan 14 '19 20:01 kenman345

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.

kenman345 avatar Jan 16 '19 14:01 kenman345

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.

ROMaster2 avatar Jan 16 '19 17:01 ROMaster2

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

kenman345 avatar Jan 16 '19 17:01 kenman345

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

kenman345 avatar Jan 16 '19 20:01 kenman345