Language settings on accept

Discussions about creating CAPI applications to run on Android devices
Post Reply
amari
Posts: 31
Joined: February 24th, 2024, 11:29 am

Language settings on accept

Post by amari »

Dear tech team,
I am unable to show messages in different languages when I use accept command, I have message file but using it make compile error,Can someone help me
sherrell
Posts: 400
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Language settings on accept

Post by sherrell »

Hi,

Could you post your zipped app so we can see what you're doing? If you don't want to post your app to the forum, please send it to us at cspro@lists-census.gov

Sherrell
amari
Posts: 31
Joined: February 24th, 2024, 11:29 am

Re: Language settings on accept

Post by amari »

Dear sherrell,
Thanks for helping me actually I have this example code

numeric manual_choice = accept(100,101, 102);

I wanna show same message in, lets say TA

for that I have message file
"
{Application 'MENU' message file generated by CSPro}
100 Select the Menu
101 Supervisor Menu
102 Interviewer Menu

Language=TA
100 மெனுவைத் தேர்ந்தெடுக்கவும்
101 மேற்பார்வையாளர் மெனு
102 நேர்காணல் செய்பவர் மெனு
"

when compiling I get error "ERROR(MENU_ID, 8): Invalid character expression" near accept command

in this context how I achieve this explain
Gregory Martin
Posts: 1804
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Language settings on accept

Post by Gregory Martin »

The accept function expects strings, not numbers, so you need to convert those numbers to strings. You can do this with either the maketext or tr functions. For example:
numeric manual_choice = accept(tr(100), tr(101), tr(102));
amari
Posts: 31
Joined: February 24th, 2024, 11:29 am

Re: Language settings on accept

Post by amari »

thanks
Post Reply