Hello,
I'm trying to add a poll to a web page of a crm portal. I managed to get it to work just fine in one language, but my portal supports 2 languages (English and French). Is there a way to make it bilingual?
Right now the way that I thought about was to add both sentences (ex: Do you like red? / Aimez-vous le rouge?) and then use JS to delete the part that is not needed when I load the page. The problem that I encountered is that when I use
{% include 'poll' poll_name:"Test Poll 1" %}
all that my jQuery sees is :
<div class="poll" data-url="/_services/polls/10152feb-f33d-4cbd-997e-f7a336c3b8bf/65adeb71-a0b4-ea11-811c-005056b067c6" data-submit-url="/_services/polls/10152feb-f33d-4cbd-997e-f7a336c3b8bf/SubmitPoll?id=65adeb71-a0b4-ea11-811c-005056b067c6"></div>
It doesn't seem to see the html code that is added for the poll.
Does anybody know of a way to make it work?
Here is my code :
<div id="myInclude">
{% include 'poll' poll_name:"Test Poll 1" %}
</div>
<script type="text/javascript">
var htmlLang = $("html").attr("lang");
$(document).ready( function() {
var a = $("#myInclude").html();
console.log(a);
});
Thank you