I am trying to put a button so it swaps to portuguese language, just like the other language buttons. But, I can't find in which project this button is inside, could someone help me please?
Printable View
I am trying to put a button so it swaps to portuguese language, just like the other language buttons. But, I can't find in which project this button is inside, could someone help me please?
Go on
Open LangMngr.cppQuote:
WarZ\src\EclipseStudio\Sources
and go to line 19
and try this:
So open LangMngr.hQuote:
void LanguageManager::Init(Languages lang)
{
r3d_assert(!m_Inited);
m_Inited = true;
//lang = LANG_RU;
if(lang == LANG_EN)
readLanguageFile("data/LangPack/english.lang");
else if(lang == LANG_RU)
readLanguageFile("data/LangPack/russian.lang");
else if(lang == LANG_FR)
readLanguageFile("data/LangPack/french.lang");
else if(lang == LANG_DE)
readLanguageFile("data/LangPack/german.lang");
else if(lang == LANG_IT)
readLanguageFile("data/LangPack/italian.lang");
else if(lang == LANG_SP)
readLanguageFile("data/LangPack/spanish.lang");
else
readLanguageFile("data/LangPack/Portuguese.lang");
else if(lang == LANG_PT)
r3dError("Unknown language %d\n", lang);
}
On line 4
try this
Quote:
enum Languages
{
LANG_EN=0,
LANG_RU,
LANG_FR,
LANG_DE,
LANG_IT,
LANG_SP
LANG_PT
};
Try this folkz
Nice job by the way folkz and thank you for always helping. Very kind of you!Code:void LanguageManager::Init(Languages lang)
{
r3d_assert(!m_Inited);
m_Inited = true;
//lang = LANG_RU;
if(lang == LANG_EN)
readLanguageFile("data/LangPack/english.lang");
else if(lang == LANG_RU)
readLanguageFile("data/LangPack/russian.lang");
else if(lang == LANG_FR)
readLanguageFile("data/LangPack/french.lang");
else if(lang == LANG_DE)
readLanguageFile("data/LangPack/german.lang");
else if(lang == LANG_IT)
readLanguageFile("data/LangPack/italian.lang");
else if(lang == LANG_SP)
readLanguageFile("data/LangPack/spanish.lang");
else if(lang == LANG_PT <--- modified from yours slightly ;)
readLanguageFile("data/LangPack/Portuguese.lang");
else <--- modified from yours slightly ;)
r3dError("Unknown language %d\n", lang);
}
PS I know you knew what you were doing. I find the editor window when posting is a wee bit small and sometimes I overlook what I'm typing. Also, one of the reasons you find me editing my posts about 10 times each hehe. ;-) Keep up the great work bud.