bladox.com Forum Index bladox.com
Turbo SIM Toolkit Adapter Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Arabic Language Support and STRING_SLV

 
Post new topic   Reply to topic    bladox.com Forum Index -> Development
View previous topic :: View next topic  
Author Message
Zaros



Joined: 11 Jul 2011
Posts: 2

PostPosted: Mon Jul 11, 2011 9:55 am    Post subject: Arabic Language Support and STRING_SLV Reply with quote

Hello,
I'm trying to add localized strings to menu using LC_AR, however i'm not sure if i'm using the correct string_slv header.
I copied the following from hello_world_ucs2.c:
u8 PROGMEM t_menu[] = "\204\10\17\200\4\42\4\100\4\65\4\62\4\76\4\63\4\60";

and replaced the "\4\42\4\100\4\65\4\62\4\76\4\63\4\60" part with unicode escape characters for Arabic language using FE unicode code page, something like this:
LC_AR("\204\10\23\200\254\149\254\149\254\149\254\149\254\149")

however it didn't show correctly, i also added the following to turbo_handler:
case ACTION_APP_INIT:
set_proc_8 (PROC_8_LANGUAGE, LC_ARABIC);
break;

Can anyone explain to me the STRING_SLV coded string format, the one if the hello_world_ucs2 sample?
Back to top
View user's profile Send private message
pz



Joined: 12 Mar 2004
Posts: 1161

PostPosted: Tue Jul 12, 2011 7:02 am    Post subject: Re: Arabic Language Support and STRING_SLV Reply with quote

Zaros wrote:
Hello,
I'm trying to add localized strings to menu using LC_AR, however i'm not sure if i'm using the correct string_slv header.
I copied the following from hello_world_ucs2.c:
u8 PROGMEM t_menu[] = "\204\10\17\200\4\42\4\100\4\65\4\62\4\76\4\63\4\60";

and replaced the "\4\42\4\100\4\65\4\62\4\76\4\63\4\60" part with unicode escape characters for Arabic language using FE unicode code page, something like this:
LC_AR("\204\10\23\200\254\149\254\149\254\149\254\149\254\149")


I don't get the \23 - this is the length - #of following bytes. It's all octal, so \23 is 19 bytes and you don't have 19 bytes. Also \254 seems wrong, it's not 0xFE. \xxx in C means xxx is octal. I guess you have it all decimal?

Quote:

however it didn't show correctly, i also added the following to turbo_handler:
case ACTION_APP_INIT:
set_proc_8 (PROC_8_LANGUAGE, LC_ARABIC);
break;

Can anyone explain to me the STRING_SLV coded string format, the one if the hello_world_ucs2 sample?


http://bladox.com/devel-docs/group__api__i18n.html
Back to top
View user's profile Send private message
Zaros



Joined: 11 Jul 2011
Posts: 2

PostPosted: Tue Jul 12, 2011 3:50 pm    Post subject: Reply with quote

Thanks, that explained a lot and my problem is fixed now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    bladox.com Forum Index -> Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group