06-05-2018 03:04 PM
Hi everyone,
Hopefully this can bring some clarity--
For the case of localization in LabVIEW NXG, the editor now makes a distinction between the "label" text and the "name" of the control that the code references. Using Localized String Dictionaries and the Get Localized String node, you can programmatically change the text that is displayed at runtime. However, the name of the control will always stay the same on the block diagram side. NI is looking to this as a better path forward for localization of LabVIEW apps.
If you're looking to just change a few labels and potentially don't need a whole dictionary, you also can go about this manually. From the control reference, you can get the label reference, which offers read/write access to the text of the label for NXG versions 2.0 and beyond.
Please let me know if this doesn't cover the use case you are concerned with. Your feedback is extremely important to us!
06-06-2018 10:43 AM
The seems a lot more complicated... BUT... if it improves localization efforts, I AM ALL FOR IT!
It's scary confusing, though - Now labels function more like captions, and the new name functions more like a label. Perhaps the new "label" property should have been called something entirely different also, so pre-NXG LabVIEW developers don't go looking for a caption property and dismiss the label property as not writable?
06-06-2018 09:23 PM
How is this handled when you import code?
06-07-2018 06:04 AM
So:
caption becomes label
label becomes name
It seems mostly confusing, while providing the exact same functionality. I don't see why changing terminology is better for localization?
06-07-2018 06:38 AM
I'm schrodinger's fence-sitter. I'm on both sides at the same time.....
On One hand, changing the handling fo such a standard feature is annoying BUT seeing how the name and Label (CG) of the controls were inherently linked before, having the "Label (NXG)" be disconnected from the actual name of the control will perhaps make this differentiation more obvious.
I presume the name of the control can then be changed via the properties pane on the right. I haven't delved into NXG for a while now. Is it now prohibited from having two controls with the same name in a VI?
06-07-2018 06:49 AM
@Intaris wrote:
Is it now prohibited from having two controls with the same name in a VI?
Yes, that was the plan, and I think it's like that.
06-10-2018 07:17 AM - edited 06-10-2018 07:18 AM
From my point of view it is a bit confusing, because at the time of execution on the front panel the label behaves like caption. In my case, normally in the block diagram I use the label using the Pascal Case and Camel Case nomenclature, and on the front panel I use the caption with the name that will be represented to the client. By using the caption on the front panel, you can align the controls showing the final result that the client will see, in this case, it would be necessary to go running the application to visualize the final result and to be able to align the controls, it seems to me a job tedious.
That said, if it is very complicated to implement and dispense the caption apart greater functionality, I think I can serve the proposal of @cool_ranch_doRITAs.
Can anyone upload an example using Localized String Dictionaries and Get Localized String?
07-03-2018 12:21 PM
Sorry to keep y'all waiting. Here's an example project that uses the concepts we talked about here. I can't take credit for it, but I can pass along instructions:
"The attached example uses the ‘Export strings’ feature, and by hand I created other folders for different languages that have fake localized text in them. A “script” basically goes like this:
For a quick demo, you can just open the attached project and, in the ‘Document’ tab, preview what the panel will show if the VI is run in an OS with the given language configured in the OS and all the default product settings."
Note that the dictionaries don't actually have the translated words in them, they simply add a [EN-US] or [DE] distinction, for example, depending on the language you are previewing. You can open up the XML files and find the panel item of interest, and change the text that is displayed by editing the text between <loc> and </loc>. Just save the document and re-preview the VI.
I hope this helps!
03-11-2020 01:13 AM