Publish VI or Application in Multiple Languages

Updated May 25, 2018

Reported In

Software

  • LabVIEW

Issue Details

I would like to publish my VI in different languages without doing any extra programming. Is there any way to do this?

Solution

The following options exist for altering the language of items in your VI:
  • Each control or indicator has two properties called Caption and Label. The label is used as the reference during execution (or the variable name), while the caption is a property for extra information or a description. If you would like to visualize several different languages within the same VI, you should modify the caption. The label must remain fixed during the execution, but the caption may be changed.
  • If you plan to change the language during the execution of the VI or application, the only solution is to modify the captions programmatically. To do this, we should access the caption through a property node. The example Changing the Language of Front Panel Labels at Run-Time explains this process.
If there is no need to change the language on the fly, there are other methods that achieve the same result. 
  • As explained previously, it is recommended to work with the caption parameters. After choosing the correct captions for one language, you can export all of the front panel captions to a text file (*.txt) with XML format. We should use Tools»Advanced»Export Strings. By accessing this file using any text editor, we can modify and rename the captions in other languages and save the new file(s) with other names. Finally, use the Import Strings function (Tools»Advanced»Import Strings) to import any of the new .txt files with XML format in other languages.
  • Call the VI dynamically. As previously mentioned, the import and export methods cannot be used in execution mode; you must perform these actions in advance and then call the VI dynamically. The attached KB code contains an example of a dynamic call with a previous setting of the language and the run time menu. All the files that are contained in the ZIP file should be saved inside the  c:\Languages folder for a proper execution.

The following tutorial, Localizing Your LabVIEW Application to Different Languages, gives an explanation of how to change the Run-Time Menu and the the Run-Time Engine languages. 
 

Additional Information

If  you are willing to go for 3rd method of extracting front panel strings to a text file and updating values, and in case you want to do it programmatically then it can be done using invoke node for the application, in VI string category and method name import.
Below is the picture shown for this invoke node:

But this change of front panel elements can not be on run time, and has to be done on edit time. So you can't call this invoke in same VI. (Because once you run to execute this invoke node, VI is  in run time not in edit time).
For this you have to create a new VI which takes reference of target VI, and uses this property node to take a modified string text file with new values of front panel elements.

Attachments

WAS THIS ARTICLE HELPFUL?

Not Helpful