From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Localization with Export/Import string

We are using Export/Import string to localize applications. We save the XML string of the front panel with Export string. Make the translation. During runtime we import the XML files to change the texts on the front panel and call the Run VI to execute our application. It work well with captions, labels and most of the controls. One exception we can't use it for default values for string controls. Import string works during edit time on everything.  But with built application it do not import default values for string controls.

Any explanation for this?

KocsisP

0 Kudos
Message 1 of 3
(2,624 Views)

It's hard to say without seeing any code but here are a couple of things you should look for:

  1. Make sure your file path is correct. Have you confirmed that the file is being read properly, only the controls are not being updated?
  2. If controls are not be updated, do you have any invoke nodes that DefaultVal.ReInitAll?
aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 3
(2,582 Views)

I am a little confused.

Does "runtime" mean executable (run-time engine), or automation - running translation vi from development environment? Is target VI running during translation in the second case?

If you are localizing user interface only (not block-diagram), I would not use labels for Front panel. I am very surprised translation of labels works from run-time engine (or if VI is running).  The same with default values - I would not expect their modification to work not from development.

Both actions require recompile of the VI. You can not call VI method DefaultValues -> Make Current Default from run-time engine. You can not set control property Label.text of the running VI. Captions are user interface, they can be changed at run-time.

One more confusion: how would import work if you have translated control label. It seems the only way to identify control. By order? Then any recompile, or vi edit can break the order of controls.

 

So for control data I would set current values (not default) through VI invoke node Control Value. Get all and Set. 

0 Kudos
Message 3 of 3
(2,568 Views)