How it works
The PHP constants are used to translate the system activity (e.g. configuration settings, error messages, labels and form elements). These are saved in the language files, which you created when you created the directory structure (german.php, english.php). Depending on the language settings in JobRouter, the relevant language file is automatically loaded.


Each file defines the same constants with the translation of each language. These constants can be used in the PHP code as well as in the XML attribute configuration (see chapter XML structure).
Example
Since the CSV system activity should be available in English and German, we first fill the language file english.php with the following content:
Contents of the language file english.php
<?php
define('CONST_SA_CSV_NAME', 'CSV Export');
define('CONST_SA_CSV_DESCRIPTION', 'This system activity can be used to export data from a subtable into a CSV file.');
define('CONST_SA_CSV', 'CSV');
Tips
•To ensure that all constant names are absolutely unique and no conflicts occur, we recommend using the prefix CONST_SA_<SystemActivityId> for constants, in our case CONST_SA_CSV_NAME. This also allows you to find constants quicker by using the source code search.
•We also recommend developing the system activity using a single language file and only to translate it into other languages after the system activity is completely implemented in order to avoid unnecessary expenses.