I started to create my application's frontend with CEGUI and everything worked great so far. But for future localisation purposes I have to enable to put all the text into arabic language. Displaying for example Thai signs works fine but arabic doesn't - so I guess it's not supported yet?
There are two main problems. First is that arabic language is written from right to left - so I got a wrong order of the characters in the output. I solved this by simply copying the last character to first position in my string and so on:
Code: Select all
CEGUI::String str((const utf8*)"القنال في هولندا هو");
utf8 buf[4];
int a = 0;
CEGUI::String str2((const utf8*)"");
for(uint i=str.length(); i > 0; i--)
{
a = str.copy(buf, 1, i-1);
str2.append(buf, a);
}
btn->setText(str2);
So I have the right order now. Second problem is, that the "look" of the signs depend on the sign before and the following one. I don't speak arabic and I don't know how other applications do this "decoding" - so I have no idea how to find the right signs to display the text properly.
I guess this should be encoded in Unicode? Does anyone know a solution with CEGUI or another free library (maybe with ICU)?
Thanks in advance!