• Resolved Guillaumeg06

    (@guillaumeg06)


    Hello There,

    I am trying your plug in and I would like to know if it possible to set up a customisation template email regarding the language through polylang?

    Or if not is it possible to have different shortcode “AddtoAnyFR” “AddtoAnyEN”,….and customize the email template for each of them?

    Best

Viewing 1 replies (of 1 total)
  • Plugin Author micropat

    (@micropat)

    You can look into dynamically adding the Additional JavaScript box to Polylang. If Polylang makes it possible, you would add the additional_js_variables option of the addtoany_options serialized array.

    Alternatively, you can do it all in AddToAny’s Additional JavaScript box like so:

    var our_site_language = document.documentElement.lang;
    if ( 'fr-FR' === our_site_language ) {
        a2a_config.templates.email = {
            subject: "Bonjour! ${title}",
            body: "Cliquer sur le lien:\n${link}"
        };
    } else if ( 'it-IT' === our_site_language ) {
        a2a_config.templates.email = {
            subject: "Ciao! ${title}",
            body: "Clicca il link:\n${link}"
        };
    } else {
        a2a_config.templates.email = {
            subject: "Hello! ${title}",
            body: "Click the link:\n${link}"
        };
    }
Viewing 1 replies (of 1 total)
  • The topic ‘AddtoAny template email multilangue’ is closed to new replies.