How to: Make a New InterWorx Language Translation¶
Translations of InterWorx are accomplished through the “.lng” files. These are text files with key ⇒ value pairs.
Making a New Translation¶
Note
Because InterWorx is developed in English, the English language file will always be complete. As such, it is recommended to use the English language file as the baseline for all new translations.
Log into NodeWorx from the browser (https://ip.ad.dr.ess:2443/nodeworx)
Navigate to NodeWorx > Languages
Click the Down Arrow next to English. This opens a new window stating the download will begin
Open the downloaded language file
Make the appropriate changes and save the file
Example–the “LG_*” parts are the keys, and the rest is the translation:
LG_HEADERHELP=Help LG_HEADERLOGOUT=Logout LG_HIDEDETAILS=Hide Details LG_HIGH_LOAD=The server load average is currently above the threshold of %1$01.2f. The current load average is %2$s. LG_HISTORY=History LG_HOME=Home LG_HOME_DIRECTORY=Home Directory LG_HOST=Host LG_HOSTING_FEATURES=Hosting Features LG_HOSTNAME=Hostname
Most translations are word-to-word replacements - simply replace the English value with the correct translation
Note
Because of variations in syntax in non-English languages, keyword substitution was added in InterWorx 4.5.
In the
LG_HIGH_LOAD
translation above, there are two variables -%1$01.2f
and%2$s
. InterWorx uses sprintf() to handle the variable substitution. The variables are numbered so they can be re-ordered as needed.Upload and add the new language by following the instructions found here