multilingual search ???

Having Problems? Need Help? Post here!

Re: multilingual search ???

Postby ChrisR » Sun Apr 15, 2012 10:14 pm

arihant2301 wrote:<?php
$actionurl = get_bloginfo('home');
$actionurl = qtrans_convertURL($actionurl, $locale) . '/';
?>

<form method="get" id="searchform" action="<?php echo $actionurl; ?>">

Thanks for the hint. The solution for an WP theme and qTranslate with setting "/lang/page/" I use is:
Code: Select all
/*  Search form custom styling */
function wpt_search_form( $form ) {
   // multilingual search Hack http://www.qianqin.de/qtranslate/forum/viewtopic.php?p=9392#p9392
   $actionurl = get_bloginfo('home');
   // adding / because home url is like "/en"
   $actionurl = $actionurl . "/";
   // pre hack action="'.get_bloginfo('url').'"
    $form = '<form role="search" method="get" id="searchform" action="'. $actionurl .'" >
    ...

Now for me secondary languages seem to work perfectly.
ChrisR
 
Posts: 14
Joined: Wed Apr 06, 2011 12:34 pm

Re: multilingual search ???

Postby chopper » Sat Apr 27, 2013 9:14 am

Thanks. It's working :)
chopper
 
Posts: 5
Joined: Mon Apr 22, 2013 2:04 pm

Previous

Return to qTranslate Support Forum

Who is online

Users browsing this forum: Google [Bot] and 5 guests