Page 1 of 1

Language settings on accept

Posted: May 10th, 2024, 4:59 am
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

Re: Language settings on accept

Posted: May 10th, 2024, 2:08 pm
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

Re: Language settings on accept

Posted: May 13th, 2024, 4:35 am
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

Re: Language settings on accept

Posted: May 13th, 2024, 8:30 am
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));

Re: Language settings on accept

Posted: May 13th, 2024, 12:13 pm
by amari
thanks