I am getting error when executing below <var> statement. Error is due to ' in the word S'il
<var name="Verbiage3" expr="' S'il vous plait veuillez saisir les 16 numeros digitaux de votre carte suivis de diese '"/>
The String getting assigned is in French language which makes use of ' at many places.
I have tried using escape sequence for ' (' and ') but that doesn't seem to be working.
Exact error that I see in log is "missing ; before statement line 1 SyntaxError: missing ; before statement line 1"
How do I fix this error?
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
How to assign a string having ' using expr in <var> tag
Re: How to assign a string having ' using expr in <var> tag
Hi,
You should be able to escape the single quote with a backslash like such:
<var name="Verbiage3" expr="' S\'il vous plait veuillez saisir les 16 numeros digitaux de votre carte suivis de diese '"/>
We put together a sample that uses this assignment and reads it back in French and it sounded as it should:
Please let us know if you have any questions.
Regards,
Plum Support
You should be able to escape the single quote with a backslash like such:
<var name="Verbiage3" expr="' S\'il vous plait veuillez saisir les 16 numeros digitaux de votre carte suivis de diese '"/>
We put together a sample that uses this assignment and reads it back in French and it sounded as it should:
Code: Select all
<?xml version="1.0"?>
<vxml version="2.1">
<form>
<block>
<var name="Verbiage3" expr="' S\'il vous plait veuillez saisir les 16 numeros digitaux de votre carte suivis de diese '"/>
<prompt><speak xml:lang="FR-fr">
<value expr="Verbiage3"/></speak>
</prompt>
</block>
</form>
</vxml>
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
Re: How to assign a string having ' using expr in <var> tag
Thanks. That worked.
However I noticed that you have used "xml:lang="FR-fr". But using the below link I was assuming it to be "xml:lang="fr-FR".
Does it matter? or both will work same way for Real Speak Engine?
French (fr-FR)
http://www.plumvoice.com/docs/dev/devel ... erence:tts
However I noticed that you have used "xml:lang="FR-fr". But using the below link I was assuming it to be "xml:lang="fr-FR".
Does it matter? or both will work same way for Real Speak Engine?
French (fr-FR)
http://www.plumvoice.com/docs/dev/devel ... erence:tts
Re: How to assign a string having ' using expr in <var> tag
Hi,
It appears to work with both. We just put together a quick sample as a proof of concept and the FR-fr was just a typo. We would suggest sticking with the format of the documentation (fr-FR), as that's always the preferred, supported format.
Regards,
Plum Support
It appears to work with both. We just put together a quick sample as a proof of concept and the FR-fr was just a typo. We would suggest sticking with the format of the documentation (fr-FR), as that's always the preferred, supported format.
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com