LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can CVI 8 display multi-byte foreign languages on the user interface, Such as Chinese?

Hello,
 
We use Lab/Windows 8.01 and Windows 2000 and we want to give out Chinese textstrings with the "SetCtrlVal" function. How is this possible? I've read a comment that it is *not* possible in CVI 6, but, hey, we have 8.01 now... 😉
 
Best regards,
Robin de Krijger
0 Kudos
Message 1 of 12
(5,783 Views)

Hello Robin,

This is still not possible in the newest version.

Regards,

RikP

National Instruments

 

Rik Prins, CLA, CLED
Software Development Engineer
0 Kudos
Message 2 of 12
(5,713 Views)

Hi Rik,

Thank you for your reply.

However, after a little research I got my Chinese texts in my CVI program.

Best regards,

Robin de Krijger

0 Kudos
Message 3 of 12
(5,711 Views)

Hello Robin,

since there's a pretty big chance I will also have to do this in the future, I'm really interested in your solution. Could you give some explenation on how you did the trick?

Thanks a lot!

0 Kudos
Message 4 of 12
(5,706 Views)

Of course!

What Windows version do you use?

(it is different for Windows XP or Windows 2000)

Best regards,

Robin de Krijger

0 Kudos
Message 5 of 12
(5,705 Views)
I'm using CVI8.0.1 on Windows XP Professional...
0 Kudos
Message 6 of 12
(5,698 Views)
Okay, that's the easy one! (of course)
 
First select: /Start/Control Panel/Regional and Language Options
Then (in the window that appeared): tab Languages, turn ON "Install files for East Asian languages"
Then (in the same window): tab Advanced, set "Language for non-Unicode programs" to "Chinese (PRC)" (or whatever language you want to display)
 
Reboot (now not sure though if this is really possible)
 
Now, in CVI, set to control font to one of those weird chinese named fonts that you have now and that you cannot read yourself...
(Use the @-fonts if the orientation from your text is top to bottom (instead of left to right))
 
Then, for example, use on a text label control:
 
SetCntrVal(panelHandle,panelControlID,"\xBA\xC9");
 
The hex code 0xBAC9 is a GBK code mapping (simplified chinese).
If you have the text in unicode (which you probably have), you must google the internet for the unicode -> GBK code mapping. I succeeded in this, so you will certainly succeed in this!
 
Well, that's about it... Good luck!
 
 
Message 7 of 12
(5,697 Views)
Thanks a lot Robin! Now don't be surprised if I start bothering you again at the time I have to implement this Smiley Wink
0 Kudos
Message 8 of 12
(5,690 Views)

Hello Robin,

This is a nice one. I think I will create a Knowledge Base out of this so future customers can take advantage of this knowledge. Thanks a lot for the input!

Regards,

RikP

National Instruments

Rik Prins, CLA, CLED
Software Development Engineer
0 Kudos
Message 9 of 12
(5,685 Views)

A small proof that it works for windows, texts and menus (see attachment)...

 

0 Kudos
Message 10 of 12
(5,681 Views)