LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Language database

Hi all,

we are trying to integrate a language-selection to our vi. The language of all labels shall be changed via one click. The translations are written in a MS Access database at the moment, but could be stored in a MS Excel Table.

How can we define the line and column from which the labels shall be taken?

Thanks for your suggestions

Karin
0 Kudos
Message 1 of 2
(2,543 Views)
An easy way to do that is to store the translated captions/labels/strings in a 2D string table, that can be saved as a text file, but with a .xls extension. That way, the file is easily opened with Excel (or in any text editor). Use the tab-separator format, not the Excel default (specific) format. That way, you do not need to have Excel on your PC.

Even if your app contains a rather large number of labels to be translated, the resulting array will never be very large. For instance 1000 labels, with 10 chars each is only a 10 Ko array ! So you can load it at run time and keep it in memory without any significant memory size cost.
Some years ago I built a translation table for a whole application (300-400 vis). I had the vi name in the first column, the string name in the second, and the translated strings (French, English, Spanish, German) in the following columns.
Blanck lines were separating vi's string blocks
The retrieval of a specific string was very simple : search the first column for the vi name, get the line number ; search the second column for the string name, starting at the vi name line position, then get the translated string in the corresponding column.

Searching and reading tools are in the Array subpalette.

Hope this helps...

CC
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 2
(2,515 Views)