LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Localizing front panel of a VI to German

I am trying to localize the front panel which is in English now to German. Using localize VI  help, I exported the VI strings, made a duplicate copy of it and translated all the strings to German. Is there a way to programmatically select these .txt files before I run the main VI?

0 Kudos
Message 1 of 4
(2,098 Views)

If you turned on captions and hid the labels of controls, then you have programmatic control of the text that is displayed next to all the controls.

0 Kudos
Message 2 of 4
(2,089 Views)

One idea is to add a language choice to a configuration file. When the program starts, you check the configuration file for what language you want to be in and then import from the desired strings file.

0 Kudos
Message 3 of 4
(2,058 Views)

importstrings.png

 

You will need to launch the VI programmatically to do this, as you cannot load the strings while the VI is running. You can open the VI reference, call the VI Strings.Import method on an Invoke Node, then run the VI.

 

I would recommend a very small launcher program. When you try to "run" your main program, the launcher program will run instead. This launcher either detects the Windows language automatically or allows the user to select which language to use, then it launches the main program. This launcher VI can be very simple and small.

 

PS: There used to be an article on NI's website about how to find your language programmatically, but the link is broken. Archive.org shows this original text:

 

"In LabVIEW, you can access certain characteristics of Microsoft Windows such as the name, and version number using LabVIEW Property Nodes. However, to find other properties, you will have to communicate with Microsoft Windows directly. Microsoft Windows contains Dynamic Link Libraries (dlls) that hold system information. For language information, the GetSystemDefaultLangID function located in the kernel32.dll will return the operating system language. The kernel32.dll is located in the <WINDOWS>\system32 directory of Microsoft Windows. In LabVIEW, you can call this function by using a Call Library Node. The code below uses the Call Library Node to identify the operating system language. See the link below for more information on Call Library Nodes."

0 Kudos
Message 4 of 4
(2,049 Views)