Title: Multilanguage issue
Last modified: August 21, 2016

---

# Multilanguage issue

 *  Resolved [patloq](https://wordpress.org/support/users/patloq/)
 * (@patloq)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/multilanguage-issue/)
 * 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](https://dl.dropboxusercontent.com/u/1681643/Screen-Shot-1-en.jpg))
   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](https://dl.dropboxusercontent.com/u/1681643/Screen-Shot-2-de.jpg).
 * [https://wordpress.org/plugins/wp-ajaxify-comments/](https://wordpress.org/plugins/wp-ajaxify-comments/)

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

 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/multilanguage-issue/#post-5141300)
 * 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: [http://wpml.org/forums/topic/cant-translate-error-message-of-wp-comments-post-php/](http://wpml.org/forums/topic/cant-translate-error-message-of-wp-comments-post-php/).
 * 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,
    Jan
 *  Thread Starter [patloq](https://wordpress.org/support/users/patloq/)
 * (@patloq)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/multilanguage-issue/#post-5141305)
 * 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): [http://kadercoach.pp-5.com/proin-ut-ligula-vel-nunc/?lang=en](http://kadercoach.pp-5.com/proin-ut-ligula-vel-nunc/?lang=en)
 * Thank you for checking this issue.
    Best, Patrick
 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/multilanguage-issue/#post-5141317)
 * 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());
       }
       ```
   
 *  Thread Starter [patloq](https://wordpress.org/support/users/patloq/)
 * (@patloq)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/multilanguage-issue/#post-5141329)
 * 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.

 * ![](https://ps.w.org/wp-ajaxify-comments/assets/icon-256x256.png?rev=2962290)
 * [Ajaxify Comments - Ajax and Lazy Loading Comments](https://wordpress.org/plugins/wp-ajaxify-comments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-ajaxify-comments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-ajaxify-comments/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-ajaxify-comments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-ajaxify-comments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-ajaxify-comments/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [patloq](https://wordpress.org/support/users/patloq/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/multilanguage-issue/#post-5141329)
 * Status: resolved