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
CAPI Multiple Language
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: CAPI Multiple Language
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.resetLanguage();
end;
Re: CAPI Multiple Language
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
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
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: CAPI Multiple Language
What version of CSPro are you using? This is a new feature in CSPro 5.0.3, which was released a couple weeks ago.
-
- Posts: 72
- Joined: March 17th, 2012, 10:46 am
Re: CAPI Multiple Language
Hi George,
Will you please share the example application.
Thanks,
PP
Will you please share the example application.
Thanks,
PP
-
- Posts: 72
- Joined: March 17th, 2012, 10:46 am
Re: CAPI Multiple Language
Can any share the example application.