CAPI Multiple Language

Discussions about CSEntry
Post Reply
asmebarya
Posts: 1
Joined: August 27th, 2013, 5:02 pm

CAPI Multiple Language

Post by asmebarya »

Dear Members
I was programming Interview questionnaire using CSPro for CAPI. I am using both English and Amharic languages in the program. I have already assigned AMH for Amharic and ENG for ENGLISH. I have also included a logic as follows to see the CAPI question and item values during the interview as per the preference of the interviewer:
Function resetLanguage()
If getLanguage() = "ENG" then
setValueSets("_ENG");
Elseif getLanguage() = "AMH" then
setValueSets("_AMH");
Endif;
end;

however I was able to change the languages in the CAPI questions but I have failed to change the languages of the value sets associated with multiple items. can any one help what logic to write in the PROC GLOBAL to choose the language when I start the CAPI data entry. Moreover, the languages of each value sets of each Item will also be changed according to the languages selected.
with best regards
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: CAPI Multiple Language

Post by Gregory Martin »

You can write a function, OnChangeLanguage, that will call your resetLanguage function. OnChangeLanguage is called by CSPro whenever the language is changed.
function OnChangeLanguage()

    resetLanguage();

end;
Alternatively, you can put the code in your resetLanguage function in an OnChangeLanguage function.
user

Re: CAPI Multiple Language

Post by user »

Dear Gregory,

I can't get change language in using this function

function resetLanguage(language)

if language = 1 then // English
setvaluesets("_ENG");
setfont(valuesets,default);

elseif language = 2 then // Russian
setvaluesets("_RUS");
setfont(valuesets,"Cyrillic",12);

else // Tajik
setvaluesets("_TAJ");
setfont(valuesets,"Tajik",12);

endif;

end;

please help (with a example)

Thanks
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: CAPI Multiple Language

Post by Gregory Martin »

What version of CSPro are you using? This is a new feature in CSPro 5.0.3, which was released a couple weeks ago.
prabhustat
Posts: 72
Joined: March 17th, 2012, 10:46 am

Re: CAPI Multiple Language

Post by prabhustat »

Hi George,

Will you please share the example application.

Thanks,

PP
prabhustat
Posts: 72
Joined: March 17th, 2012, 10:46 am

Re: CAPI Multiple Language

Post by prabhustat »

Can any share the example application.
Post Reply