How do I auto language translation for text object ?

0 favourites
  • 3 posts
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • Hello.

    i have

    -sprite with string instance variable.

    -Global variable LANGUAGE

    -Text object

    In properties of this sprite in layout editor i set this string as " Dog "

    Now in event sheet

    when i click on the sprite

    when Language is 0, display text in English (Dog)

    when Language is 1 display automatically in Polish (Pies)

    etc..

    si i need to construct translate typed string "Dog' to other languages

    its possible to make that way?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • use a json file to store your strings in the choosen language

    EX:

    then use a string var for choose the language

    after upload the json filer to construct and put in to AJAX

    set the text you want to

    JSON.Get("lang." & langChoose & "." & (string index))

  • I do something similar in my projects. All texts are added to a single Texts family. It has a "tag" instance variable defined on it. I can specify unique tags for each text object on the layout, for example "player_score", "game_over" etc.

    There is an array containing all these tags with strings translated to different languages.

    And I have a single "Texts On Created" event, which looks up the string in the current language for each text by its tag.

    I chose to use an array because it's easy to edit, but this can be a dictionary or JSON.

    Here is a (paid) template with this and a few other useful mechanics for game localization:

    construct.net/en/game-assets/game-templates/multi-language-support-c3-2407

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