Commandline Translation Tools
Next to the WinCC OAtranslator tool three commandline tools for translation are available. Two programs for translating existing panels are available. The last tool is available for removing a language that is not a project language from a panel file.
The three programs are: WCCOAtoolParse for exporting identifiers, WCCOAtoolTrans for translating and WCCOAtoolLangfor removing a language from a panel file.
WCCOAtoolParse
The following table contains the command line options for WCCOAtoolParse:
General Options for WCCOAtoolParse | Description |
---|---|
-dictIN <input-dict> | Name of the existing dictionary to use. |
-dictOUT <output-dict> | Name of the dictionary to create. |
-html <html-dict> | An HTML dictionary. |
[-noRef] -langid <lang-id>[{,<lang-id> ... } ] |
Specifies that the reference language is not being used. The option can be used to specify the reference and target languages by using the lang-ids. The function getGlobalLangId() returns the ID of a project language (lang-id). |
-langid <refLangID>,<destLangID>[,<destLangID>] |
ID's of the languages for the dictionary. First one is the global ID of the reference language. The entries of the reference language are translated into to the destination languages. The function getGlobalLangId() returns the ID of a project language (lang-ID). |
-files <file>[{,<file> ..}] | A file/files that are translated. |
[-overwrite] [-multitrans] | Overwrite the existing dictionary. |
[-noChange] | Do not change the dictionary, only execute a "dry run". |
F ile options | |
-pD | Only translate the data points of the project. |
-vA | Translate all catalogs and panels from the WinCC OA version. |
-vC | Translate only catalogs from the WinCC OA version. |
-vP | Translate only panels from the WinCC OA version. |
-pA | Translate all catalogs, panels and data points from the project. |
-pC | Translate only catalogs from the project. |
-pP | Translate only panels from the project. |
Log options | |
-logF | Output only fatal errors. |
-logE | Output log error messages. |
-logW | Output log warnings. |
-logP | Output log progress (file level). |
-logS | Output log steps (word level). |
-logV | Verbose logging output. |
-overwrite | Last entry coming in is saved, old ones will be deleted. |
-multitrans | Separate translations may be saved for different panels, catalogues etc. |
WCCOAtoolTrans
The following table contains the command line options for WCCOAtoolTrans:
General Options for WCCOAtoolTrans | Description |
---|---|
-dict | Specification of the dictionary file. |
-langid <refLangID>,<destLangID>[,<destLangID>] |
Id's of the languages for the dictionary. First one is the global ID of the reference language. The entries of the reference language are translated into to the destination languages. The function getGlobalLangId() returns the ID of a project language (lang-id). |
-files <file>[{,<file> ..}] | A file/files that are translated. |
F ile options | |
-pD | Only translate the data points of the project. |
-vA | Translate all catalogs and panels from the WinCC OA version. |
-vC | Translate only catalogs from the WinCC OA version. |
-vP | Translate only panels from the WinCC OA version. |
-pA | Translate all catalogs, Panels and data points from the project. |
-pC | Translate only catalogs from the project. |
-pP | Translate only panels from the project. |
Log options | |
-logF | Output only fatal errors. |
-logE | Output log error messages. |
-logW | Output log warnings. |
-logP | Output log progress (file level). |
-logS | Output log steps (word level). |
-logV | Verbose logging output. |
WCCOAtoolLang
The following table contains the command line options for WCCOAtoolLang:
General Options for WCCOAtoolLang | Description |
---|---|
-proj <name> | Name of a registered SIMATIC WinCC OA project. |
-rem[ove] | Removes a language that is not a project language from a panel file. |
-lang <languageid> | ID of the language (e.g. en_US.utf8) that should de removed. |
Log options | |
-logE | Log error messages. |
-logP | Log progress. |
-log +stderr | Messages are written to the command prompt. Without this option, the messages are written to the LogViewer. |
WCCOAtoolLang does not work for panel files stored in xml format.
As of the version 3.16 ISO projects cannot be created anymore. Create UTF-8 projects instead.
When translating ISO coded texts into a UTF-8 coded language, the same language-fallback-mechanism as when searching for a file apply.
The panel must be specified by using the full panel path.
Example
In this example a dictionary "dictionary.txt" is created by using the tool WCCOAtoolParse. It contains the source language English (10001) and Target languages German(10000) and Russian(10027) as well as the panel Sample.pnl. The dictionary is imported by using the tool WCCOAtoolTrans.
Export:
-
WCCOAtoolParse -dictOut dictionary.txt -langid 10001,10000,10027 -files D:/Projects/WinCCOAProj/panels/Sample.pnl -overwrite -logW -log +stderr 2> D:/Projects/WinCCOAProj/log/WCCOATranslator.log
INFO: dictionary.txt is created in data/trans sub-directory of the project
Import:
-
WCCOAtoolTrans -dict dictionary.txt -langid 10001,10000,10027 -files D:/Projects/WinCCOAProj/panels/Sample.pnl -logW-log +stderr 2> D:/Projects/WinCCOAProj/log/WCCOATranslator.log
Example
The following example removes French (not a project language) from the panel file "langtest.pnl". The messages are output in the command prompt.
-
WCCOAtoolLang -proj TST_RemoveLangTarget -rem -lang fr_FR.utf8 -file D:\Projects\TST_RemoveLangTarget\panels\langtest.pnl -log +stderr -logP