Export tab
After loading the translator panel, it is displayed as shown in the figure below. The panel consists of the following four tabs:
With the Export tab you can create or update a dictionary containing the words of your
panels, catalogs, and data point elements (data point- and alert texts). Simply choose
the panels, catalogs and data point elements you want to translate and create a
dictionary. The created dictionary file (dictionary.txt
) is
saved in <proj_path>/data/trans. Note that if the directory data/transis missing,
it has to be created manually.
If you have already translated panels, catalogs or data point elements and created a dictionary, you can update the dictionary and add new words into it. The reference language defines the "source" language for the translation. The reference language words are exported and written into the dictionary file and can be translated into the desired language.
You can also translate easily new panels containing words that are already translated in the dictionary. If you already have a multilingual project, translate, for example, an English panel into German (and create a dictionary). Later you create new panels containing new words but also some words that already exist in the dictionary in German. The translator recognizes these words automatically and you do not have to translate the same words again. During the export linefeeds are replaced by \n and when importing they are reconverted to linefeeds.
The Export tab consists of:
-
WinCC OA/Project directory : The WinCC OA and project directories are displayed in the corresponding fields. The fields can not be changed.
-
: In the Reference language combo box, you can select any of the project languages. The reference language defines the source language for the translation. The words of the source language are written into the dictionary and can be translated. The active project language is displayed as default.
If you already have an existing multilingual project, you can export all the existing panel entries of different languages. This means that not only the entries of the chosen reference language are exported (written into the dictionary.) but also the existing entries of the other project languages. For details on the dictionary file structure, see the chapter Dictionary functions tab.
The amount of languages to be exported is displayed in the Languages to export field. The Select languages ... button opens the following window for selecting the "target" languages:
Languages not selected : Shows the project languages which can be exported into the dictionary. The reference language chosen earlier cannot be chosen here. Selected languages: Shows the chosen project languages that are exported into the dictionary.
Buttons:
-
All >>> : Selects all languages from the Languages not selected text box.
-
>>>:Selects one language from theLanguages not selectedtext box.
-
<<<:Returns the selected language from theSelected languages(to Languages not selected)
-
<<< All : Returns all selected languages from the Selected languages.
-
OK:Confirms the selection.
-
Cancel:Cancels the selection.
If a dictionary already exists, meaning you have already translated panels, catalogs or data point elements. Note that when using the translator for new translations, the order of the languages (reference language, languages to export) must remain the same as for the first translation.
The translator requires that you choose the language(s) you want to use when creating the project. It is not possible to add a new language afterwards.
It is recommended to export the language wherewith you have generated (edited) your project. Otherwise the dictionary will be small and not very useful. You can however export any project language.
-
Export files: Choose here the panels and catalogs you want to export, Select panels ... opens the File selection window:
Add file
Selects a file (panel).
Add directory
Selects a directory with more than one panel.
Delete : Deletes the chosen file or directory.
All Panels : Chooses all panels.
OK : Confirms the selection.
Cancel : Cancels the selection.
Select catalogs ... opens like Select panels ... a file selection window.
The DP-elements check box selects the descriptions of all data point elements as well as
the user-defined alert texts. The selection of the DP-elements check box invokes the
ASCII Manager which creates adptetxts.txt
file containing the
data point descriptions and alert texts.The file is saved in <proj_path>/dplist.
The descriptions and alert texts of thedptexts.txt
fileare
written to the dictionary file(<proj_path>/data/trans) and can be translated.
In order that WinCC OA Translator works correctly (Export -> Translation and -> Import of the dictionary), all panels and message catalogs must be copied once into the project directory so that the import works correctly.
For the message catalogs you only have to copy the catalogs of one language to the project directory.
-
Export options: You can export the entries of your panels, catalogs and data point elements and create a dictionary by choosing the Create dictionary option. The existing entries of your project are written into the dictionary file and can be translated. If you already have an existing dictionary, update the old one (Refresh dictionary) with new words from your panels,catalogs and data point elements. If no dictionary exists, it is not possible to choose the above-mentioned options and the create dictionary option is automatically chosen.
The Overwrite existing translations check box overwrites the translations in the dictionary file (the translator overwrites the existing words and does not recognize the already existing identical translated words). If you have a dictionary containing, for example, the word "Save" in English and "Speichern" in German. Now you translate a new panel containing the same word "Save" with a different German translation "Speichern unter" and select the Overwrite existing translations option, the German word "Speichern" is overwritten with the word "Speichern unter".
If you only select the Refresh dictionary option (without Overwrite existing translations ) and translate new panels containing words that already exist in the dictionary, the translator recognizes these words and you do not have to translate them again.
The option "Allow different Translations" allows you to create different translations for the same word in different panels. In other words you can create one translation for one reference word in a panel. You can, however, create different translations for this reference word if several panels contain this same word. Thus, different translations for the same word in different panels are possible.
-
Options: select one of the options:
-
-
-
Only log fatal errors: fatal errors seldom occur.
-
Log error messages: Log for error messages.
-
Log warnings: outputs warnings such as
WCCOAtoolParse(1), 2017.10.04 12:22:12.665, IMPL, WARNING, 0, , Translation conflict: > the reference word Vers translated to V e r s i o n and Patch
-
Log progress (file level): logs the "create dictionary" or the "refresh dictionary" process and outputs information such as
WCCOAtoolParse(1), 2017.10.04 12:17:12.966, IMPL, INFO, 0, , Create PnlPanelHolder C:/Siemens/Automation/WinCC_OA/3.16/panels/about.pnl
-
Log steps (word level): logs the steps to create a dictionary such as
WCCOAtoolParse(1), 2017.10.04 12:24:56.392, IMPL, INFO, 0, , Translator>Export>Dictionary> wrote 177 lines to dictionary
-
Verbose logging: logs all steps, messages, errors. Verbose logging contains all above log options "Only log fatal errors", "Log error messages" etc.
-
-
-
Protocol: Choose the option Log progress messages to log the single worksteps of the export process. Open log file after export opens the chosen log file after the export process automatically.
Buttons:
Delete log file
Deletes the log file from the log directory. If the file cannot be deleted an error message is shown.
Note that the log file cannot be deleted when the log viewer is open.
Edit log file
Edits the log file. Opens the log file for .
In the log file you can see the start and the end time of the export process, the individual steps of the export process as well as the number of lines written into the dictionary. For details on dictionary file, see the chapter Dictionary functions).
Format: three different formats can be used for creating a dictionary. JSON, Unicode and UTF-8. You can find the dictionary in the directory WinCC_OA_Proj/data/trans. For the UTF8 format, the dictionary.txt is created. For the JSON format the dictionary.json. and for the Unicode the files dictionary_unicode.txt and dictionary.txt. Note that you cannot import a unicode dictionary file, you have to change the format to UTF8 first. How to import a unicode file as an UTF8 file, see chapter Translations in Excel.
Note also that you cannot edit the JSON format on the "Dictionary Functions" tab. Edit the file dictionary.json via a text editor. The JSON format provides the advantage that the export and import are faster than for the other formats
Start: Click on the button to create a dictionary.
Please note that the config entry maxLogFileSize has no effect on the log files of this tool. This means that if one of the log files exceed the specified size, a new one will not be created.