Support » Plugin: WP Ajaxify Comments » Multilanguage issue

  • Resolved patloq


    Hi, I really like WP-Ajaxify-Comments. It works very well. I’ve only a tiny issue. Currently I’m setting up a multilingual site wit WPML. German is set as the main language. The second language is English. When I’m on the English section and I try to post an empty comment WP-Ajaxify-Comments kicks in to displaying its usual message ‘Posting your comment. Please wait…’ (see screen shot) until it has validated the fields, then stops the posting, and prompts ‘FEHLER: Bitte f├╝llen Sie die erforderlichen Felder aus (Name, E-Mail-Adresse).’ That’s all how it should be apart from the language. For the language part it seems to fall back to the site’s primary language as you can see on this screen shot.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author janjonas


    Hi patloq,

    I’ve successfully testes the compatibility of the plugin to WPML, but one has to add a workaround similar to the one described here:

    Most likely you do not need to add PHP code but can use the options that my plugin provide. For more details, please send me a link to your page because I need to see the “URL structure” of your page.

    Best regards,

    Hi Jan,

    Yes, it looks like a similar case. In my case however, I use WPML in the mode ‘suffix language code’ already. Nevertheless, I added the function from WPML link you have posted above. The result: a white screen when posting a comment. Therefore I removed it.

    Here is the link to a post of this site (still in development):

    Thank you for checking this issue.

    Plugin Author janjonas


    Please try to set the ‘OnBeforeSelectElements’ callback option to:

    var form = jQuery(dom).find(WPAC._Options.selectorCommentForm);
    var actionUri = new Uri(form.attr("action"));
    if (!(actionUri.getQueryParamValue("lang"))) {
    	form.attr("action", actionUri.replaceQueryParam("lang", (new Uri(window.location)).getQueryParamValue("lang")).toString());

    Thank you, you are legend! Your above code for the OnBeforeSelectElements callback option works perfectly.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multilanguage issue’ is closed to new replies.