05-25-2011 05:47 AM
Hello,
I am using LabWindows/CVI 9.0.1 along with WindowsXP in German.
I am trying to use the "User Interface Localizer" to translate my UIR controls which are in German (default language) to Chinese. I went through topics in the forum and found that CVI does not support Unicode. I am following the following procedure to translate my UIR controls -
Problem:
Can you please tell me how to get around this problem?
Thanks!
05-26-2011 10:00 AM
Hello ,
The chinese language is a language with multibyte characters.
Are you using a operating system which is just singlebyte langauge based (just like th eenglish OS)?
Here are some Links which probably might help you:
http://digital.ni.com/public.nsf/allkb/F23D7180B0A1A76B86256BC3004FD865?OpenDocument
The following is a tutorial which shows you how to use a multibyte language in CVI:
http://zone.ni.com/devzone/cda/tut/p/id/3841
I hope these Links can help you
Best regards
Regina
National Instruments
AE Germany
05-26-2011 10:27 AM
You shouldn't change the Operating System Regional Settings to Chinese, or you wouldn't see the special German characters.
So you have to use the following settings:
WindowsXP Region and Language Setting: German - Not able to create the Language file (.lwl) - Chinese symbols appear as '?'
I think that the problem "Chinese symbols appear as '?'" could be related to this UI Localizer bug that has been fixed in CVI 2009 (if I'm right)
05-26-2011 10:51 AM
Hi again,
Thanks for your replies
I am using a German version of Windows XP. So, I guess it is Singlebyte.
And again, the problem being that, when I opt for -
I am still not sure as to what I have to do!
05-27-2011 01:10 AM
Follow these steps:
I attach a screenshot to show these settings
05-27-2011 03:48 AM
Hi,
Firstly, thanks for a detailed step by step explanation. This was the procedure I had followed earlier. However, to be more flexible - I want to create the lwl files for all my UIR files using one dictionary file, *.lwd.Now with -
Windows Region and Language Setting - German
I open the User Interface Localizer tool, Load GUI,
I paste the corresponding Chinese symbols for each label using the GB2312 language and then use the Export Strings function to create my dictionary file, which by default is in ANSI format. Opening this lwd file in an editor, I see that my Chinese symbols appear to be corrupt, no worries, I go on,
Now, to create my lwl file, I open my User Interface Localizer tool, Load GUI, Import Strings (Dictionary File) and I see all my Chinese symbols again and I can happily export my lwl file!
This works, BUT ...
I would like to create the lwd file externally in an editor, where I have just the the names of the default labels and I wish to paste the Chinese translations
In this case, I have the problem that I cannot save my lwd file, for example in Notepad, with Chinese symbols in ANSI format. Even if I do, I lose my Chinese symbols.
So, I simply tried chosing to save in lwd file in Unicode format, this way, I don't lose my Chinese or German labels. But now, when I Import Strings, the translated labels are simply NOT updated! (I assume as the localizer tool does not support Unicode lwd files)
This is the reason I tried to select the Windows Region and Language Setting to Chinese
In this case, I can create the lwd file in ANSI format with Chinese symbols being displayed, but, the German special characters are now converted to a Chinese symbol! Thus, I cannot translate labels which have these special German alphabets.![]()
Any idea as to what can be done to overcome this problem? How to get over this?
05-27-2011 03:59 AM
Ok, I understood your question.
I think that you've been experiencing a problem without solution:
CVI doesn't support Unicode, but a kind of multi-byte; in lwl files are ANSI files where the Unicode chars are written using their multi-byte representation.
Based on my experience, if you use the Localizer tool you must use only this tool (for lwd and lwl), and it's a little bit cumbersome.
I didn't find any other solution.
06-09-2011 01:22 PM
Harmonium,
If I understand your problem correctly, you simply need to find a way to edit the .lwd file such that you can enter Chinese characters without having to change your global language to Chinese. That should just be a matter of finding the right editor (by the way, I agree with Vix that you should not change your Windows language to Chinese, since that will have potentially bad consequences on many applications that you run in your PC).
For example, I use Notepad++, which allows me to select any encoding I like, regardless of the Windows language. In Notepad++, all I have to do to create translated Chinese characters is to select Encoding>>Character Sets>>Chinese>>GB2312, which changes the display language of my ASCII text to Chinese. This allows me to type/paste Chinese characters in the editor, view them correctly, and then save the file in a way that the CVI localizer tool can still understand (i.e. not Unicode). Of course, once you change the character set to Chinese, the umlauts in the German text will not display properly, but this won't have any adverse effects when you save the file. It's merely a slight inconvenience when you read them, as you're translating them.
If you need to type additional German strings in the editor, you can always change the character set back to Western European. This will cause the Chinese characters to not display correctly, but it won't modify them. This might be inconvenient if you need to keep alternating between typing German and Chinese strings but, if that's the case, maybe you can type all the German strings, then type all the Chinese strings?
Luis