• Hi,
    I’m trying to install Aweber’s sign in form on my site, currently translated in french and english.

    The sign in form is supposed to appear as a popup over the page.
    I have 2 scripts/codes to copy-paste from Aweber in order to display those forms, 1 for each language.

    My problem is:
    – how can I find out where to copy-paste the english and the french script/code in order to display each one for its corresponding language ?
    – can I use the language detection included in polylang to add one Aweber script per language ?

    Thanks for reading 🙂

    https://ww.wp.xz.cn/plugins/polylang/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Chrystl

    (@chrystl)

    Hi,
    Could you give the link of your plugin.

    Thread Starter HappySun

    (@happysun)

    Well…
    My plugin is Polylang for the management of languages.

    Then, Aweber has a platform on their site to create the piece of script for the Sign In forms, and they provide automatically those scripts to be inserted within the body tags of the site.

    For instance, I got for french version:
    <div class=”AW-Form-1839868564″></div>
    <script type=”text/javascript”>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = “//forms.aweber.com/form/64/1839868564.js”;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, “script”, “aweber-wjs-q8szyb1dh”));
    </script>

    and for the english version:
    <div class=”AW-Form-1611189339″></div>
    <script type=”text/javascript”>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = “//forms.aweber.com/form/39/1611189339.js”;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, “script”, “aweber-wjs-nrq65vut6”));
    </script>

    What I’m trying to do is to display one or another depending on the detection done by polylang of the language of the page…

    Or another possibility would be a script trick using the parameters of language of Polylang (fr_FR, en_GB, etc) looking like so:
    <script>
    if lang=fr_FR then run script_fr
    else run script_en
    </script>

    Do you see a solution that can solve this problem ? 🙂

    Thread Starter HappySun

    (@happysun)

    For you to see them working, I’ve installed both script in the body part of my site:
    corposano.com

    I’ve inserted them at the end of the header.php via the Appearance/Editor tool of the WP admin.

    Plugin Support Chrystl

    (@chrystl)

    Is it freely available? If yes you could you give a link.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Installing AR sign in forms’ is closed to new replies.