06-09-2009 09:17 AM
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?
Solved! Go to Solution.
06-09-2009 12:39 PM
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.
06-10-2009 04:34 PM
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
06-11-2009 08:13 AM
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).
06-12-2009 01:46 PM
OlderJohn-
Great. I'm glad you got this working to your satisfaction.
Regards,
-Mike
08-20-2009 09:47 AM
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)
08-21-2009 01:26 PM
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:
Hint: This is a VI Snippet. You can just drag it into LabVIEW 2009 and it will create the code!
08-21-2009 02:39 PM
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.
05-19-2011 06:39 AM
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
05-19-2011 09:12 AM
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.