Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

localization of controls

Hi,

 

we are using UI-classes of Measurement Studio in our software.
We have to deliver our software for russian market, for most parts of the software its no problem,
all translations are proper displayed when OS is switched to russian.
Only problem are the (non MFC) controls of the Measurement Studio, it seems they ignore the settings of the OS.
What could we do here?

 

Kind regards,

Alex

0 Kudos
Message 1 of 8
(6,914 Views)

Hi alexM_,

 

localization isn't always easy, and often needs aditional configuration besides changing the language of the operating system. Wich controls are you using specifically and can you give us some example code, we would like to test this?

 

Regards

0 Kudos
Message 2 of 8
(6,867 Views)

hi,

 

sorry for late feedback due to my vacation.

 

We use e.g. class "CNiButton". Example:

 

A line in our localization document:

Import = "Импортировать"

 

std::string name = GetText("Import");

CNiButton myNIButton;

CButton myMFCButton;

 

...

 

myNIButton.SetOnText( name.c_str( ) );

myMFCButton.SetWindowText( name.c_str( ) );

 

 

The MFC Control works fine, the NI Control displays wrong characters.

 

 

We do not have UNICODE-project.

In the OS-Settings, we switched display language to russian and we switched to russian for "UNICODE - incompatible" software.

 

Regards and thanks in advance,

Alex

 

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

Hi alexM,

 

could you send us a screenshot of the behaviour you are seeing? That would greatly help us to reproduce the issue at hand.

Regards

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

Hi,

 

for sure.

 

RussianTextExample.jpg

 

First picture shows a NiButton and its control properties.

Second one shows a Frame (MFC-CButton) and its control properties.

 

Regards,

Alex

 

0 Kudos
Message 5 of 8
(6,821 Views)

I fear this will take longer to acchieve. You could circumvent the problem by loading a picture of this font into the button.

http://forums.ni.com/t5/Measurement-Studio-for-VB6/Loading-a-picture-in-button/td-p/136253

 

In the meantime I will still have a closer look at that problem.

0 Kudos
Message 6 of 8
(6,740 Views)

Hi,

 

 

Unfortunately, the source of the problem is that a multibyte string (such as the Russian characters) cannot be set programmatically with the C++ API that allows us to access the ActiveX controls. The controls themselves can handle multibyte strings, however.

 

The best approach right now would be to not do it programmatically. Instead of the c++ api you could use satellite resource DLLs to represent different languages. We found a few links online about doing this; the first one looks like it's for Visual C++ 6, and might be harder to translate to Visual Studio 2005 and later. The second is a bit more clear, but contains less information.

 

http://support.microsoft.com/kb/198846

 

http://www.codeproject.com/Articles/11731/Resource-DLLs-and-Language-Selection-Menu

 

 

0 Kudos
Message 7 of 8
(6,672 Views)

Hi,

 

thanks for your answer.

We already use satellite DLLs in our project. But i cant go this way here, since user is able to change the text during runtime (see picture above).

 

I think i will try out the workaround with the bitmap button.

 

Regards,

Alex

0 Kudos
Message 8 of 8
(6,669 Views)