TorqueLocalization
by Corin · in Torque Game Engine · 11/08/2006 (12:23 am) · 2 replies
Using information found HERE, i can't make work any GUI with a TextID.
I have this in main.cs of main folder:
And at console.log:
Any help, please??
I have this in main.cs of main folder:
function onStart()
{
// Default startup function
// setup localization:
$I18N::base = new LangTable();
exec("base/lang/tables/Spanish.cs");
exec("base/lang/tables/English.cs");
$I18N::base.addLanguage("base/lang/tables/Spanish.lso", "Spanish");
$I18N::base.addLanguage("base/lang/tables/English.lso", "English");
$I18N::base.setDefaultLanguage(0); // Spanish is default here
$I18N::base.setCurrentLanguage(0); // Spanish is current
}
function onChangeLanguage()
{
setCurrentLanguage(getModLangTable(), $pref::I18N::language);
Parent::onChangeLanguage();
}And at console.log:
--------- Parsing Arguments --------- Compiling base/lang/tables/Spanish.cs... Loading compiled script base/lang/tables/Spanish.cs. Compiling base/lang/tables/English.cs... Loading compiled script base/lang/tables/English.cs. Language Spanish [base/lang/tables/Spanish.lso] activated. Language Spanish [base/lang/tables/Spanish.lso] activated.
Any help, please??
#2
Why not put this << mLangTableName = StringTable->insert("base");>> at GuiControl constructor or anything like this?
11/08/2006 (11:43 pm)
Wow!! Very ugly!!Why not put this << mLangTableName = StringTable->insert("base");>> at GuiControl constructor or anything like this?
Torque 3D Owner Randy Condon
Default Studio Name
langTableMod = "base";
This made the text controls work with textID's.
Other controls, like the bitmapbuttontext control, needed this line added to each button.
Ugly, yes, but it works.