Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Translation files
Re: Translation files [message #54716 is a reply to message #54706] Thu, 03 September 2020 16:27 Go to previous messageGo to previous message
idkfa46 is currently offline  idkfa46
Messages: 155
Registered: December 2011
Experienced Member
Hi guys,
I'm here again... I made a test but I have a few problems changing the language setting inside the tool

I set the .t file that include (encoded UTF8)
#ifdef _MSC_VER
#pragma setlocale("C")
#endif

T_("Support")
itIT("Supporto")


I try to change the language with the function below:
void STDctrl::Language(void)
{
	MenuBar bar;	
	bar.MaxIconSize(Size(80,35)).LeftGap(85);
	bar.Add("Italiano", Images::Flag, THISBACK1(SetLang, 10));
	bar.Add("English", Images::Flag, THISBACK1(SetLang, 20));
	bar.Execute();
}

void STDctrl::SetLang(int i)
{
	switch(i) {
	case 10:
		SetLanguage(LNGC_('I','T','I','T', CHARSET_UNICODE));
		Refresh();
		break;
	case 20:
		SetLanguage(LNGC_('E','N','U','S', CHARSET_UNICODE));
		Refresh();
		break;
	default:
		SetLanguage(LNGC_('E','N','U','S', CHARSET_UNICODE));
		Refresh();
		break;
	}
}


and this:
GUI_APP_MAIN
{	
SetLanguage( GetSystemLNG());
}


When I open the software the "SetLanguage( GetSystemLNG())" function works and the tool display the italian translation "supporto" but if I try to call the function THISBACK1(SetLang, 10 or 20) nothing happen. Maybe I have to refresh something?

One more question, can I turn the default setting to italian and English as a second language with something like this?รน

T_("Supporto")
enUS("Support")


Thanks,
Matteo



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Simple Thread
Next Topic: Create exe from Windows to Linux
Goto Forum:
  


Current Time: Sun Aug 24 14:30:19 CEST 2025

Total time taken to generate the page: 0.08885 seconds