Open holke opened 4 years ago
I am certain that there is a standard way in game development to support multiple languages, which we should look up.
My first idea was to have a global 2 dimensional dictionary "texts" with the two dimensions "language" and "description". Each text in the game is the actually a script whose update routine look up in the dictionary. For example for the restart button:
txt = texts[gameSettings.language]["RestartButtonText"]
where
texts["german"]["RestartButtonText"] = "Neustart"
texts["english"]["RestartButtonText"] = "Restart"
We can then have little german and english flags on one corner of the screen (in the menu) that can be used to switch the language.
Performance wise it does not seem too clever to update the content of each text in every frame. Are there also update routines that run like every 10 frames or so? A 1 second delay after switching the languages should not be a problem.
if (Time.framecount % N == 0)
called in Update. I also asked Thomas to give us access to the website. So we can make that multi-language too.
But maybe there are infrequent update routines?
Access granted to @maccxs
The homepage is entirely german while the game texts are in english. We should add a german version of the texts and supply an option to switch languages.