add language to token via api does not seem to work

More
2 years 2 weeks ago #126454 by tvanover
tvanover created the topic: add language to token via api does not seem to work
Hi,

I'm creating access tokens via the api. This works fine.

However, I can't work out how to add the language.

Here's a code snippet:

$pData = array('user' => array('lastname' => $_GET["email"], 'firstname' => '', 'email' => $_GET["email"],'attribute_1' => $_GET["ticketid"],'attribute_2' => $_GET["engineer"], 'language' => 'Dutch'));
$participant = $myJSONRPCClient -> add_participants($sessionKey, $survey_id, $pData);
$invite = $myJSONRPCClient -> invite_participants($sessionKey, $survey_id);

Everything works fine, except for the language attribute. It's always empty.

thanks,
Tom

Please Log in to join the conversation.

More
2 years 2 weeks ago #126470 by holch
holch replied the topic: add language to token via api does not seem to work
I'd say that "dutch" is not an acceptable language definition. I am not sure if this is the problem, but you can't just write the name of the language. LS does not recognize this. For Brazilian-Portuguese you need to use something like this: pt-br.

I guess dutch is probalby nl-nl or something. Try to create a token by hand with dutch as a language and see what is showing up in the table.

But I am not sure if this is the problem why it is not showing up. But I can imagine that LS recognizes that this is not the correct format and doesn't include it.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
2 years 2 weeks ago #126476 by tvanover
tvanover replied the topic: add language to token via api does not seem to work
Hi,

clever thinking of you. I looked in the table, and it's stored as 'nl'.
french as fr, english as en.

Thanks!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now