LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-Lingual Front Panels (English, Portuguese, Chinese)

Solved!
Go to solution

I'm looking for assistance with taking a program (written in LV 8.5.1) that currently can load languages from a CSV text file (currently English and Portuguese) and add the ability to also load Chinese text.

 

I have a routine written that parses the localization CSV file (each column is a separate language).  Then I programmatically go through each row and load the correct column into its respective spot (Captions for text entry, Boolean Text for buttons) (Boolean Text because you cannot click through the Captions).  I found the Foreign Languages in Labview thread and have been able to copy and paste Chinese text into the ActiveX control while the application is not running.  I have not been able to use the Read From Text File VI to successfuly import that text.

 

Does anyone have an idea how I would be able to import this data into LabVIEW?

0 Kudos
Message 1 of 11
(5,345 Views)

I have made some headway after I stumbled upon the Display Text in Hindi Language and have gotten my captions to update with no change to the string VI.  However, the Boolean Text property manipulation did not work (I've attached the LV8.5.1 VI and sample text file that I have been using to test).

 

It almost seems as if the "BoolText.InterpAsUnicode" property does not affect how the text is displayed.

Download All
0 Kudos
Message 2 of 11
(5,325 Views)
Solution
Accepted by topic author OlderJohn

OlderJohn-

 

I have reviewed your code and discussed this issue with some of my colleagues.  LabVIEW does not support Unicode, and this may be a case where it does not work correctly.  I found a Knowledge Base Article that may be helpful in assisting you in getting this to work (Link below). 

 

Knowledge Base 4UO964C5: Displaying Non-English Characters in LabVIEW

 

Regards,

Mike S
NI AE
0 Kudos
Message 3 of 11
(5,294 Views)

Mike, thanks for the information.  I believe I have found a way to get the text to appear correctly (though it is time consuming).  I have gotten to the point where I can bring the Unicode strings into LV and place them in the control Captions or Boolean Text. 

 

Getting them to display correctly is another matter entirely.  My current method is: copy a Unicode string from Notepad, paste the Unicode string over the Caption or Boolean Text and format the string completely before "clicking off" (where the cursor disappears).  Then I can import the strings that I have read from the text file and have them display the correct English or other localization characters (with no extra spaces or any other oddities that I have noticed).

0 Kudos
Message 4 of 11
(5,271 Views)

OlderJohn-

 

Great.  I'm glad you got this working to your satisfaction.

 

Regards,

 

-Mike

Regards,

Mike S
NI AE
0 Kudos
Message 5 of 11
(5,256 Views)

The saga continues.

 

I have noticed some graphical glitches when I have been loading the Chinese characters via the property nodes (see attached image).  The items circled in red are buttons that are Disabled, but the Boolean Text (in Unicode) does not appear as disabled.  The items circled in blue are Boolean Texts for buttons that are hidden.  I have verified that they are just graphical glitches because clicking on them does nothing, and they disappear if I use another window to cover the area and then uncover it again.  It almost appears like the process to put the Boolean Texts in takes longer than updating other properties.

 

Does anyone know of a way to force LV (8.5.1) to redraw the front panel?  (Properties, Methods, Windows Functions, etc)

0 Kudos
Message 6 of 11
(5,155 Views)

Hi John,

 

Let's try this...  There is a property mentioned in the LabVIEW Intermediate class to Defer panel Updates.  Perhaps if we set this to false then true very quickly it will force a panel redraw.  Here is the code:

 

 deferpanelupdates.png

 

Hint: This is a VI Snippet.  You can just drag it into LabVIEW 2009 and it will create the code!

Stephen Meserve
National Instruments
0 Kudos
Message 7 of 11
(5,128 Views)

Stephen,

 

I had attempted to use this property already (where I performed the loading of the Unicode texts into the controls), but I have inserted it later into the sequence to no avail.  The screen did not update (and I added a 300ms delay between writing the Boolean Text and using the Defer Panel Updates properties).  The text for the hidden buttons was still visible.

 

I have watched the VI while its execution was illuminated and noticed an irregularity.  Some of the buttons on the screen I am using to test are hidden before running have been hidden the last time it was run.  I then run the VI with execution highlighted.  When the button is hidden and I wrote the Boolean Text property to the button, the Boolean Text appeared out of nowhere (with the button still remaining hidden).  The subsequent hiding of the already hidden button did not make the text disappear.

 

Seeing this, I forced the buttons visible before the VI loads the booleans and updates each button's visible status.  I have not had the text appear for unused buttons in the runs since.  I have also noted that writing the Boolean Text properties after "Defer Panel Update" is enabled still causes the text to appear on the screen (it does not disappear until "Defer Panel Updates" is disabled).  I've attached the VI that I have been using (but trimmed down to not need subvi's) so you can see for yourself.

0 Kudos
Message 8 of 11
(5,122 Views)

how can you access a hidden property like (BoolText.InterpAsUnicode) it would be nice to know every properties options. This one is not in my drop down list

Thanks

0 Kudos
Message 9 of 11
(4,723 Views)

atedude,

 

Community: A List of Tips and Tools for using Unicode in LabVIEW: https://decibel.ni.com/content/docs/DOC-10153

 

LabVIEW Configuration for Unicode details how to setup LabVIEW for this.

0 Kudos
Message 10 of 11
(4,711 Views)