Preliminary Note For translating the report Items there are translation files for each provided language (English, French, Chinese, Japanese, German). The text items of the report are translated by NLS files (*.lng) These are just simple text files and can be edited with simple text editors, like Notepad. The format of the content is much more easier that e.g a XML format
Just define the internal name of the desired item and add your desired translation after the equal sign (beware that the item name is not already existing)
To get the desired item in the Python script, use the getNLS(…) method from the NLS-Class The parameters are : the (exact) name of the item and (optional) a default string, if the item couldn´t be found.
By default the language files are located in the E2 installation …\Lib\site-packages\cenpylib\languages
In case of customization, the whole languages folder languages can be copied to a desired path, which is given with the create command. Otherwise the report takes the default files. Customer related settings and translation can be done there. Only the desired language file needs to be edited. |