About Store Forum Documentation Contact



Post Reply 
Multilanguage application
Author Message
Harry Offline
Member

Post: #1
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
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: Multilanguage application
App.lang=XXX;
Str text=MLT("english", PL,"polski", ..)
07-13-2011 01:12 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #3
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
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
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
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #5
RE: Multilanguage application
Ok thanks, I thought there is another way, because now I have to make two copies of this arrays smile
07-14-2011 05:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply