Javascript API - Modal Translation

Posted in General by Gustavo Paiva Tue Oct 31 2017 17:34:58 GMT+0000 (Coordinated Universal Time)·3·Viewed 931 times

How can I translate the Javascript API modal's messages? I know that using the parameter "text" I can edit the default message. But what about in these cases "If User is already subscribed" and "If User had blocked"? At this point I'm using something like this: window._pcq.push(['triggerOptIn',{subscriberSegment: 'homepage', modal: {text: 'Receba alertas sobre nossa promoção!', blackenBackground: true}}]); Cheers
Oct 31, 2017

Hello Gustavo,

The modal with the message will only appear with the opt-in i.e., only when the subscriber has not yet subscribed or blocked the notifications. It will not appear in the cases "If User is already subscribed" and "If User had blocked".

So, the default "text" field will be displayed on the modal when the visitor is shown the native browser opt-in for notifications only.

Oct 31, 2017

Hi Saurabh, thanks. But that's not accurate. In these cases I can also see a modal with the messages:

If User is already subscribed
You are already subscribed to get instant alerts from us. Keep an eye on your browser for new notifications from us.

If User had blocked
Uh-oh! You seem to have blocked the notifications last time you came on our website. To see how to subscribe Click here

How can I translate these messages? Isn't it possible?

Nov 1, 2017

Hello Gustavo,
Sorry for the confusion my reply may have created.

You are correct. The modal you are referring to is different and unfortunately, it is not yet accessible from our JavaScript API. So, the text for the two modals viz., already subscribed and blocked users cannot be changed explicitly and will remain with the default configurations.

I have noted down your concern and have updated our Tech Team with the same. They will soon fix it and include it in the documentation as well. I wish to thank you for your finding here.

  
Markdown is allowed