The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 [solved] Translation of Texts in GetNBox dialogs

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
hofmaale Posted - 10/26/2016 : 02:29:02 AM
Origin Ver. and Service Release (Select Help-->About Origin): 2015G Sr1
Operating System: Win 7

Hi there,

I have another question to which, I hope, you might have the answer.

I have some OriginC-Scrips that show dialogs to the User when called, created using the GetNBox.h based dialog-functions.
This works quite well. Since I accidentally installed the German version of Origin (I normally use the "original" one), some of the texts i.e. in a ComboBox are translated. This is OK in some cases ("Frequency" e.g. becomes "Frequenz", which is correct), "funny" in others: (electrical) "ćurrent" translates to "Strom" in German, not "Aktuell" - which means "currently" or "up to date".

Is there an option I can pass to the GetNBox to suppress automatic translation? I guess it's done using a standard lookup-type translation table as it's done for the whole Program, but the context is different for my dialog...

Thank you in advance,
Alex
5   L A T E S T    R E P L I E S    (Newest First)
VladGets1 Posted - 11/02/2016 : 04:59:43 AM
Its really working
quote:
Originally posted by hofmaale

Thank you very much - this of course solved the problem!

hofmaale Posted - 10/28/2016 : 04:19:00 AM
Thank you very much - this of course solved the problem!
folger Posted - 10/27/2016 : 10:27:42 PM
Hi Alex,

Origin will try to localize entry strings for GETN_COMBO and GETN_LIST type. You need to explicitly specify option not to do localization for them, as show in following code:

#include <Origin.h>
#include <GetNbox.h>
void TestUI()
{
	string entries="Frequency|Current|Voltage";
	GETN_BOX(uiBox);
	GETN_LIST(get_Combo, "ComboBox", 1, entries);
	octree_modify_attribute(&GETN_CURRENT_SUBNODE, STR_OCNTRL_OPTNS, OCNTRLPARAM1_NOT_LOCALIZED, 0);
	GETN_STR(info_Text1, "(Select an Item)", "hidden"); GETN_HINT_EX(FALSE, FALSE);
		
	if (GetNBox(uiBox))
	{
		out_tree(uiBox);
	}
	else
	{
		printf("Abborted.\n");
		return;
	}
}


Thanks
Folger
Originlab Developer
hofmaale Posted - 10/27/2016 : 05:09:53 AM
Hi, Yuki.

Well, I wouldn't mind posting my code, but it's a few hundreds of lines. But I wrote a short "minimal example" which perfectly illustrates the problem:


#include <Origin.h>
#include <GetNbox.h>

void TestUI()
{
	string entries="Frequency|Current|Voltage";
	GETN_BOX(uiBox);
		GETN_LIST(get_Combo, "ComboBox", 1, entries);
		GETN_STR(info_Text1, "(Select an Item)", "hidden"); GETN_HINT_EX(FALSE, FALSE);
		
	if (GetNBox(uiBox))
	{
		out_tree(uiBox);
	}
	else
	{
		printf("Abborted.\n");
		return;
	}
}


The resulting Dialog-Box looks like this:


As you see, the items in the ComboBox are translated. Am I calling the wrong function to display the Dialog?

Thanks in advance,
Alex
yuki_wu Posted - 10/26/2016 : 04:49:34 AM
Hi Alex,

Generally speaking, the string will not be translated if you wrote the code by yourself. Only the strings of system function will be translated automatically. I am not sure whether you call some of system functions in your code.

Would you mind posting your code here for further identifying the problem, for example, the piece of code about that ComboBox?

Thanks,
Yuki
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000