02-26-2015 10:04 AM
Hello everybody,
I have to implement a multi-language application. I have already done it with french-english.
But my problem is that now, I have to add the chinese language.
When the application is launched, the user choses the language in a list. Then the right text file (containing the selected language) is used to display the correct language (for the indicators or the captions).
First of all, I am wondering if the text file should be in UTF-8 in order to display chinese in LabVIEW (i have already done it with greek, and back then I had a text file in UTF-8, and I was converting the text in LabVIEW from multi-character text to unicode before displaying it).
I am also wondering if it is possible to have alphanumeric control in chinese, french or english (french or english are pretty muche the same, the problem is only for chinese) depending on the choice made by the user when he launched the application. If the language is chinese, then when the user will type some text in the control, chinese symbols will be displayed.
Thank you in advance fo your answer.
02-26-2015 10:22 AM - edited 02-26-2015 10:26 AM
I found easier to use UTF-8 for the translation file. See the post from John_P1 (message 2 of 8):
http://forums.ni.com/t5/LabVIEW/Multilanguage-user-interface/m-p/3061319#M872913
You could have alphanumeric control in UTF-16, but you have to update the control while you type (Figure 8: Event Handler for the Value Changed event of the string control):
https://decibel.ni.com/content/docs/DOC-10153
One advise when you you work with Unicode in LabVIEW: DO BACKUP !!!
02-27-2015 02:28 AM
Thanks a lot, I am still searching for the code with the event structure to update the control.
Regarding the property nodes Text.InterpretAsUnicode and Caption.InterpretAsUnicode, I did not found them in the string indicator/control. Even if I set the UseUnicode=True in the LabVIEW.ini.
Is there a way to find these property nodes ?
Thank you.
03-02-2015 10:04 AM
Add the key "SuperSecretPrivateSpecialStuff=true" in the LabVIEW init file (https://lavag.org/topic/15869-what-exactly-is-supersecretprivatespecialstuff-for/) you will have access to those properties:
03-02-2015 10:14 AM
Awesome !! Thanks a lot. I think that with all of this, I should be able to make something that works.
The name of the key made me laugh ^^ At first, I tought it was a joke.