A file to be imported has the .csv
format. The first line is a header (example: TextList Id Default en_US
). The other lines contain text list entries. You get this kind of file by exporting
the text lists of the project to a file. There you can edit the text list entries
and then import the file outside of CODESYS. When importing, CODESYS handles the text list entries differently for the GlobalTextList
and for dynamic text lists.
GlobalTextList
-
CODESYS does not create new text list entries for an unknown ID.
-
CODESYS ignores changes that affect the ID or the source text.
-
CODESYS accepts changes in the translations.
TextList
-
For a new ID, CODESYS supplements the corresponding text list with a text list entry.
-
For an existing ID that does not agree in the source text, the source text of the text list is overwritten with the source text of the file.
-
CODESYS accepts changes in the translations.
Importing a file
Requirement: A project is open with a text list or global text.
-
Double-click the object “GlobalTextList” or an object of type “TextList”.
The object opens.
-
Click “Textlist Import/Export Text Lists”.
The “Import/Export” dialog opens.
-
In the “Choose file to compare or to import” input field, click for more (
) and select the directory and file (example:
Text_lists_corrected.csv
). -
Select the “Import” option.
-
Click “OK” to close the dialog.
CODESYS imports the text list entries of the file into the respective text lists.
Example
Contents of the file Text_lists_corrected.csv
TextList Id Default en_US Text_list_A A Information A Information A2_en Text_list_A B Information B: OK Information B_en: OK Text_list_A C Information C Information C_en Text_list_A D Information D Information D_en Text_list_A E Information E Information E_en Text_list_A F Information F Information F_en Text_list_A G Information G Information G_en AlarmGroup 2 Warning 2 AlarmGroup 1 Warning 1 GlobalTextList Information B Information B_en GlobalTextList Information A Information A_en GlobalTextList Switch Switch GlobalTextList Counter: %i Counter : %i
These contents are applied to the text lists with the same name in the project.