Applies To:
  • CitectSCADA 5.xx

Summary:
I want to read the comment from a variable tag and display it on screen with the DspInfoField() function. This works fine for regular comments, but if I put the comment in multilanguage syntax (e.g. @(My Tag Comment) ) then DspInfoField() returns an empty string instead of the comment. 

Solution:
To display multilanguage text, that text must be in the language database Citect is currently using. For example, if you use the command

SetLanguage("French",1), or if you set the parameter [Language]

LocalLanguage=French in the file: windows\citect.ini, Citect looks for

French.DBF in the directory the project is in.

If your multilanguage text isn't listed in the NATIVE column of that database, Citect will not display that text in the runtime. Normally, Citect searches your project for multilanguage text when you compile your project, and it automatically adds it to that database. However, the compiler doesn't check Tag Comments.

To fix this, you need to add the comments into that database manually.

In Citect 5.10 Service Pack B and later, add the comments to the NATIVE column of the file: 

citect\user\your project name\pglang.dbf

When you compile, this will be copied into the database specified by the [Language] LocalLanguage parameter automatically.  If you have other language databases, you will have to change that parameter to the next language and recompile.

Repeat this until you have gone through each language.

In Citect 5.10 Service Pack A and earlier you will have to manually copy the comments into the NATIVE column of each language database you have. (e.g.French.DBF, English.DBF, etc.)

If you are using MS Excel for editing, open the file:

citect\bin\save_dbf.xls

then open the database you want to edit. When you are done, right-click on any cell and choose Save/Close DBF.

 

Keywords:
 

Attachments