language reset for value sets

Discussions about CSEntry
Post Reply
Dan

language reset for value sets

Post by Dan »

Hello forum,

I have tried resetting the language for my value sets, but am unable to see the changes in the value sets when I run the survey on the tablet.
I ran it two times with two different syntax, following what I have seen in some documentation:

1)
PROC GLOBAL
function resetLanguage()
if getlanguage="ENG" then setValueSets("_ENG");
elseif getlanguage="SPA" then setValueSets("_SPA");
endif;
end;

2)
PROC GLOBAL
function resetLanguage(language)
if language=1 then setvaluesets("_ENG");
elseif language=2 then setvaluesets("_SPA")
endif;
end;

Thank you for your time!
Dan
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: language reset for value sets

Post by josh »

Do your English value sets all end in _ENG and your Spanish values sets in _SPA? Without that setvaluesets() won't work.

Are you calling the resetLanguage function yourself from a userbar function? The name of the function that CSPro will call when the user changes the language is OnChangeLanguage so if you are expecting CSPro to call your function you must name it exactly that way.

You may want to look at the new version, CSPro 6.2. It has full support for multi-language value sets. You can define labels in different languages for the same value set and when the user changes languages the system automatically shows the right one. It is much simpler.
Dan

Re: language reset for value sets

Post by Dan »

Josh, thank you.
I had failed to call the onchangelanguage() function.
Dan
Post Reply