How to effectively translate your application

Hey!
In this tutorial I will teach you how to best and effectively translate your application!
All you need to translate your application is to add the translation file to Assets and that’s it!

  1. The first thing we need to do is create the translation files (in json file),
    I created two sample translation files:
    in English: { "string1": "one", "string2": "two", "string3": "three" }
    And in Hebrew:{ "string1": "אחד", "string2": "שתיים", "string3": "שלוש" }
    If you want to translate your file to a company that doesn’t work with json files, you can convert your file to csv at this site: https://json-csv.com/
    And after you get the translated csv file, convert it back to the json file at this site: CSV to JSON - CSVJSON
    Then rename the file to the following name: “(app-name)-(Translation language code)-Translation”
    *Note that you do not use spaces in the file name!

  2. After we put the translation files into the application, the translation needs to be activated in the application, the following image will explain what each block does:

  3. And that’s it! From now on your application is translated!
    translation.aia (35 .2 ק״ב)
    translation.apk (4 .8 מ״ב)
    You will need to add this extension to your project for the translation to work: App Inventor Extensions: File | Pura Vida Apps

13 Likes

thank you so much

1 Like

I do it with dictionaries

1 Like

Hi,

I made changes to your blocks, now it also works through companion thanks to FileTools by @vknow360 (Thank you vknow360).

Blocks

translation3.aia (64.1 KB)

3 Likes

Hi @DevYB
Thank you for using FileTools :heart_eyes:
But instead of using FilesList you can use FileListFromAssets.
Also both file extensions will work similarly in apk (both can get file list from assets in apk) but TaifunFile can’t get file list from assets during live test.

2 Likes

Thank you very much, I didn’t know about this thing.
I edited my first post.

1 Like