Language Resources

Language resources allow you to implement multi-language support for the script. Moreover, the automatic substitution of the required language will occur both in the program interface and during the script execution. This feature is useful if you plan to make your script available to the public. At the time of writing this article, Eonza supported only two languages - English and Russian. So for example, let's create a script that will also support these two languages.

Step 1. Let's define the name of the script and the text it will output in English. If the resource is not used during the script execution, you can start its name with the symbol _. In this case, the compiler will skip this line.

_hello - Script prints Hello
lng.hello - Hello, world!

Step 2. Switch to Russian and add translations for these language resources.

Step 3. Specify the name of the script as #_hello# in Settings.

Step 4. Add the Write to Console command with #lng.hello# text.

Now let's run our script and see the text in the current interface language. If we change the interface language in the program settings and run the script again, we will see that the script language has also changed.

Downloads Documentation Scripts