Multiple Languages

0 favourites
  • 6 posts
From the Asset Store
Implement multi-language translation inside your game effortlessly with the language.translate plugin!
  • Hey there,

    My game is gonna have multiple language support. So now i got a question.

    At the start you can choose your language, let's say english,german and italian. I have set up 3 global variables for each. Now if you choose, lets say english, the variable "english" becomes 1. Now i want all conversations being in english. I'm really not sure what would be the smartest way, but i thought maybe of saving all conversations in an array and just call them by the language-variable. Can somebody tell me if/how this works, cause i'm still learning about arrays but im definitely not quite sure how to use them for this situation.

    Thank you in advance!

  • Anyone has a smart solution?

  • Hi, one variable for the language is enought the value would be german, english or italien.

    And yes i think you would need an array with alle the text for each language and always load the

    one you need, at least thats how i would do it.

    But there will be some problems for example the same sentence in german is offen longer than in english.

    So your textobject needs to be bigger too, or your font size smaller.

    Example:

    Shoot all enemys

    Erschieße alle Feinde

    you need a score of at least 500

    du benötigst mindestens 500 Punkte

    use left mouse to fire

    benutze die linke Maustaste um zu feuern

  • This tutorial may help you: https://www.scirra.com/tutorials/444/su ... -languages

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • grigrizljac dsminor

    Great Tutorial, thank both of you . Hope i can understand how to do it.

  • Another question relating to this topic.

    Can somebody tell me how i can write a condition into an xml file? For example, i have a variable which sets the language of the game. Like 1 for english, 2 for german etc. Now i wanna write all the dialogue into an xml file. Now i need to check the condition "if english-variable is 1" then ......... How would i write a variable check inside the xml document?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)