If you are having a notice about writing the .mo files please read this doc

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by Panovski 6 years, 10 months ago.

Assigned support staff: Harshad.

Author Posts
December 26, 2012 at 2:22 am #93061

Panovski

Hi,

Im using 'Different languages in directories' and when I post a comment using the second language I get 404.
enabling '?lang=' is fixing this issue but i must use 'languages in directories' because of WPML-BP plugin.

Basiclly the domain.com/sr/wp-comments-post.php is not found.

How can i fix this issue ?

December 26, 2012 at 5:46 am #93068

Harshad

Dear Panovski,

Can you please add the following code to your theme's functions.php file and check comments work on secondary language?

//first make sure you have jQuery on that page
add_action('wp_enqueue_scripts','add_jquery');
function add_jquery(){
    if (!is_admin())
        wp_enqueue_script( 'jquery' );
}

//then just change the url to suffix language code
add_action('wp_head','change_comment_form');
function change_comment_form(){
if (!is_admin() && (is_page() || is_single())){
if (ICL_LANGUAGE_CODE=='en'){
echo '<script> jQuery(document).ready(function($) { $("#commentform").attr("action", "<em><u>hidden link</u></em>"); });</script>';
}elseif(ICL_LANGUAGE_CODE=='sr'){
echo '<script> jQuery(document).ready(function($) { $("#commentform").attr("action", "<em><u>hidden link</u></em>"); });</script>';
}
}
}

Edit :: replace &quot 😉 with ")

December 26, 2012 at 3:32 pm #93158

Panovski

It works!

Thank you very much Harshad.

So basicly if I found any other error related with sitename/wp-somefile*.php this is the way to fix it.