Harry
Member
|
Multilanguage application
What is the easiest and the most flexible way to make application multilanguage (I can set in options actual language) in EE?
|
|
07-13-2011 12:55 PM |
|
Esenthel
Administrator
|
RE: Multilanguage application
App.lang=XXX;
Str text=MLT("english", PL,"polski", ..)
|
|
07-13-2011 01:12 PM |
|
Harry
Member
|
RE: Multilanguage application
Thank you. I din't know that engine have this option.
One more question. What's with arrays with characters (used in ComboBoxes for example). I tried make something like this:
Code:
static CChar *shd[]=
{
MLTC(L"Off",PL,L"Wylaczone"),
MLTC(L"On",PL,L"Wlaczone"),
//"Off",
//"On",
};
but it has no right to work ok. Is there any quick way to do this?
(This post was last modified: 07-13-2011 05:25 PM by Harry.)
|
|
07-13-2011 05:21 PM |
|
Esenthel
Administrator
|
RE: Multilanguage application
the code is ok, but note that if you create the object as global, it gets initialized before the engine (and before InitPre/Init), so it uses not yet initialized App.lang - App.lang has undefined value
you can move
Code:
static CChar *shd[]=
{
MLTC(L"Off",PL,L"Wylaczone"),
MLTC(L"On",PL,L"Wlaczone"),
//"Off",
//"On",
};
from global space to function space, it will be initialized when function is called (at this point App.lang should be defined)
Code:
void setGui()
{
static CChar *shd[]=
{
MLTC(L"Off",PL,L"Wylaczone"),
MLTC(L"On",PL,L"Wlaczone"),
//"Off",
//"On",
};
combobox.set ..
}
|
|
07-14-2011 12:13 PM |
|