LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Character Set for buttons in User Interface Library (e.g. Confirm Popup)?

Solved!
Go to solution

I'm getting my head around character set issues for my new localization requirements.

 

How do I control the language for labels on items that are part of the CVI UI Library such as the "Yes" and "No" buttons that appear on a ConfirmPopup() window?  Are they supposed to follow the native language of the OS?

 

Thanks,

Ian

 

 (BTW, it would be great if there were a KB page that pulls together the main concepts regarding the UI Localization Tool, multi-byte strings in one's code, pasting translations from a source such as a Word doc into a .c file, etc.)

 

Edit:

Not sure how I missed it before, but here is a related thread . Do I really need to go and hand-craft replacements for those Library panels?

Message 1 of 8
(3,907 Views)
Solution
Accepted by topic author Ian.W

Hi Ian,

 

Unfortunately, the CVI Run-Time Engine is not localized, and there isn't a very good mechanism for you to translate the built-in strings of the RTE. It is possible, but it's clunky, and it doesn't allow you to dynamically modify your language in an already running program.

 

You need to find the strings that you need to translate in the CVI message file (c:\windows\system32\cvirte\bin\msgrte.txt). When you see a double-underscore character in the string, this means that the letter that follows is underlined. So, if you want to translate the "Yes" and "No" buttons that are used in ConfirmPopup, you need to replace the "__Yes" and "__No" strings.

 

For more information, read the Programmer Reference>>Creating and Distributing Release Executables and DLLs>>LabWindows/CVI Run-Time Engine>>Configuring the Run-Time Engine>>Translating the Message File topic in the CVI help.

 

Note that if you want to distribute a translated message file in a CVI distribution you have to check the "Install custom Run-Time Engine message file" option in the Advanced tab of the Edit Installer dialog.

 

I take your point that there isn't very good support for localizing CVI programs, which is also why there isn't very good documentation for it. This is definitely something that is in the CVI roadmap for future improvement.

 

Let me know if you have any other question.

 

Luis

NI

Message 2 of 8
(3,897 Views)

Thanks, Luis. I appreciate the prompt and detailed answer.

 

I think I can get by for now with only translating a handful of key button labels.

 

However, it would be great if translated RTE message files could be shared. Right now it looks like there could be a lot of repetition of this translation task if each NI client does their own. Has NI considered doing at least a few of the most popular languages, and/or faciltiating an "as-is" exchange of translated files?

 

--Ian

0 Kudos
Message 3 of 8
(3,888 Views)

 


@LuisG wrote:

Unfortunately, the CVI Run-Time Engine is not localized, and there isn't a very good mechanism for you to translate the built-in strings of the RTE. It is possible, but it's clunky, and it doesn't allow you to dynamically modify your language in an already running program.

...

I take your point that there isn't very good support for localizing CVI programs, which is also why there isn't very good documentation for it. This is definitely something that is in the CVI roadmap for future improvement.


 

I think that this is a quite common need for users, at least for the User Interface labels.

In msgrte.txt there are also error strings, but I think they could remain in english because they're not part of the user interface.

 

I suggest Ian to submit a new idea in the CVI Idea Exchange forums

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

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

I have one more immediate question in the translation:  Where can I find the strings in the printer dialog used by the PrintPanel function?  They do not appear in the RTE strings file.

 

Thanks,

Ian

0 Kudos
Message 5 of 8
(3,840 Views)

Hi Ian,

 

Are you referring to this dialog?

 

printpanel.png

 

If so, then the strings should be in the message file. For example (in the CVI 2010 version):

 

12508   "E__ject page after printing"

 

If, instead, you're referring to the dialog that appears when you click on the Properties button, that is not a CVI dialog -- it belongs to the printer driver and CVI has little control over it. I would expect that the strings would appear in the OS language, but that probably varies from driver to driver.

 

Concerning your earlier suggestion of allowing the sharing of "as is" translated message files, that isn't something that we have considered, but there's no reason why it couldn't be possible. But before that happens, we will need to come up with a better mechanism for allowing the use of multiple message files in a single program. This is something we hope to have support for in the future.

 

Luis

0 Kudos
Message 6 of 8
(3,820 Views)

Thanks, Luis.

 

That was indeed the dialog. Sorry, but I was not thinking clearly and searched for several key words, forgetting the underscore.  Smiley Sad

 

The only ones missing are the Name: Status: Type: Where: and Comment: labels, which I believe/hope come from the OS. We'll see...

 

--Ian

 

 

 

 

0 Kudos
Message 7 of 8
(3,772 Views)

The labels themselves come from CVI:

 

12502   "__Name:"
12503   "Status:"
12504   "Type:"
12505   "Where:"
12506   "Comment:"

The values, however, do come from the OS, with the exception of the status messages which come from CVI:

 

12538   "Idle"
12539   "Busy"
12540   "Door open"
12541   "Error"
12542   "Initializing"
12543   "Input/Output cctive"
12544   "Manual feed"
12545   "Out of toner"
12546   "Not available"
12547   "Offline"
12548   "Out of memory"
12549   "Bin Full"
12550   "Cannot print current page"
12551   "Paper jam"
12552   "Out of paper"
12553   "Paper problem"
12554   "Paused"
12555   "Deleting job"
12556   "Printing"
12557   "Processing"
12558   "Low toner"
12559   "User intervention required"
12560   "document(s) waiting"
12561   "Waiting"
12562   "Warming up"

0 Kudos
Message 8 of 8
(3,736 Views)