What's the best way to translate your strings?

0 favourites
  • 4 posts
From the Asset Store
This collection of music is the beautiful performance of rather small strings ensemble (8 first violins, 6 second violin
  • My project is adapted for translations, however I have no idea what's the best way to allow someone to translate my project and then add the translated strings into my project..

  • My suggestion would be:

    1) Create a spreadsheet with all of your strings, one column for each language.

    2) Copy those strings into a json array file or save the spreadsheet as csv and use a converter tool such as this: http://www.convertcsv.com/csv-to-json.htm , using the "CSV to JSON array" option.

    3) If you use the converter you will need to modify the output file slightly so that it's suitable for C2:

    {

    "c2array":true,

    "size":[2,3,1],

    "data":[ [ ["english0"], ["french0"], ["german0" ] ],

    [

    [ "english1"], ["french1" ], ["german1" ] ],

    ]

    }

    In this example each row is a new string and each column is a different language.

    4) Save this text file as *.json and add it to your project by right clicking on the files icon in the Projects bar and selecting "import files".

    5) Add an array object and the AJAX object to your project.

    6) Import your json data into the array object by using the AJAX object:

    On start of layout: AJAX | Request yourArray.json (tag "yourArray")

    AJAX | On "yourArray" completed: Array | Load from JSON string AJAX.LastData

    7) All of your strings should now be in the C2 array.

    8) You can now set the correct language string by calling it from the array e.g.:

    Set text1 to array.At(stringNo,language)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I will take this method into consideration, thanks. By the way, I don't know what does 'spreadsheet mean, could you explain this to me? 0_0

  • Like Excel or Google sheets.

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