Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • dont’t know if It could be useful. I use wordpress 2.7.1 and use wp-multilingual plugin. I also got troubles with multilingual and search plugin (clicking on search button, language resetted to default).
    I solved in this way:
    first I wrote a function in the header.php file of my theme to recognize the actual language used by visitor. This is the code:

    function language (){
    global $actual_language;
    $my_url = "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
    $actual_language = substr($my_url , -2, 2);
    return $actual_language;
    }

    then, I add an hidden field to the form in the searchform.php file of my theme:

    <input name="language" type="hidden" id="language" value="<?php echo language()  ?>"/>

    that’s all.

    this hidden field append “&language=actual_language” to your search query so the action of your submit button becomes:action=”your_blog_url/?s=word_you_are searching_for&language=actual_language”

    this prevent to change to default language when you use the search module of your blog

    Same problem for me
    It automatically switch to first sidebar.
    Could be a problem with theme?

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