LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ_CLICK_EVENT

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 -

  1. I have with me a Dictionary File (*.lwd) which has translations of control labels from German -> Chinese. The dictionary file is in ANSI format, (as I assume LabWindows/CVI does not support Unicode, UTF-8 etc)
  2. I have changed the Region and Language Settings in my WindowsXP under Control Panel to Chinese by following the topic - Install Fonts and Character Sets? in link Creating and Shipping a Localized Application: Install Fonts and Character Sets,
  3. Next, I create a language file (*.lwl) for my UIR file using the dictionary file using the "User Interface Localizer" tool,
  4. However, when I try to preview the translated UIR file, the control labels with special German alphabets, such as ä, ö, ü, ß, are not translated. In fact, I see a Chinese symbol replacing these German alphabets which I assume is due the the WIndowsXP Region and Language Settings.

Problem

 

  1. WindowsXP Region and Language Setting: German - Not able to create the Language file (.lwl) - Chinese symbols appear as '?'
  2. WindowsXP Region and Language Setting: Chinese - Not able to translate labels which have German special characters, ä, ö, ü, ß

 

Can you please tell me how to get around this problem?


Thanks!

0 Kudos
Message 1 of 8
(4,290 Views)

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

 

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/f23d7180b0a1a76b86256bc3004fd865?O...

 

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/9ed39758a26a096a862568960060271b?O...

 

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

0 Kudos
Message 2 of 8
(4,283 Views)

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)

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 3 of 8
(4,277 Views)

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 - 

 

  1. WindowsXP Region and Language Setting: German - I create the Language file (*.lwl) - But the Chinese symbols appear as '?????' in my translated UIR Smiley Sad
  2. WindowsXP Region and Language Setting: Chinese - I create the Language file (*.lwl) - But this time, I am unable to translate labels which have German special characters, ä, ö, ü, ß. So, for example, if I want to translate the word Störung to Chinese, I can't as the word Störung is displayed differently on WidowsXP - with the special German alphabet, ö, being replaced by a Chinese symbol! Smiley Surprised (as Vix has pointed out)

I am still not sure as to what I have to do!

0 Kudos
Message 4 of 8
(4,274 Views)

Follow these steps:

  • set WindowsXP Region and Language Setting to German
  • create your uir file with German labels (with special characters ä, ö, ü and ß)
  • load this uir in the Localizer tool
  • in the Localizer tool set "Local language" to GB2312 (i.e. Chinese charset)
  • in the Localizer tool write (or paste) the Chinese labels
  • click on the "Preview" button and you will see you uri with Chinese labels. If this preview is wrong, the problem is a bug of the Localizer tool, so you must upgrade to CVI 2009. But when you load your lwl file in your application, you'll see Chinese characters, because the RTE itself is not buggy

I attach a screenshot to show these settings

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
Message 5 of 8
(4,266 Views)

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.Smiley Surprised

 

Any idea as to what can be done to overcome this problem? How to get over this?

 

 

 

 

 

 

0 Kudos
Message 6 of 8
(4,257 Views)

Ok, I understood your question.

I think that you've been experiencing a problem without solution:

  • if you change the OS settings, this affect all the programs and if you enable Chinese, you won't see anymore any special chars (Italian, German, Russian, ...)

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.

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
Message 7 of 8
(4,254 Views)

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

0 Kudos
Message 8 of 8
(4,220 Views)