How correctly translate the game?

All Hi!
I’m not native English speker and my game need translate on both languages by default.
I’ve read documentation and saw “Guide: Localization”, but i don’t understand how it work on practice.
I’ve saw couple games other developers with many languages in their games
and i saw type of translations like <<if $language = 'EN'>> [English text of the passage]<<elseif $language = 'ES'>>[Spanish text of the passage].
How i will do this correctly? Please, write any practice examples.

1 Like

Hi there! There are a few ways of doing it:

  • Use TME’s Localization code (it’s JavaScript with a setting that you need to edit a bit)
  • Use conditional statements (like your example)

I personally use the first option in my games (See this source code as example - playable here.

I also have a whole chapter on localization in my SugarCube guide.

2 Likes