Jump to content
nionwebdesign

Translating 'search In Navbar And Widget

Recommended Posts

nionwebdesign    0
nionwebdesign

Hi there,

 

How can I translate the 'search'  text that got displayed in the primary navigation bar and the search widget? I've already added to Dutch .mo file in my custom template language folder but with no result (all other parts are translated though).

 

I've also looked into searchform.php file in the template but there's much to be seen there. Same for the nav and navbar sections of the template. 

 

The default Wordpress settings in the config.php are also set to Dutch.

 

Any help is much appreciated.

 

Niels

Share this post


Link to post
Share on other sites
batman    389
batman

Hi Niels

 

You can use this, add to Pagelines Customize (plugin)

It is advisable to learn how to do this on your own too.  

Check out http://www.pagelines.com/wiki/Custom_CSS

 

 

add_filter('pagelines_search_form','override_search_form');

function override_search_form() {

$searchfield = sprintf('<input type="text" value="" name="s" class="searchfield" placeholder="%s" />', 'Buscar'); // modify here

$searchform = sprintf('<form method="get" class="searchform" onsubmit="this.submit();return false;" action="%s/" ><fieldset>%s</fieldset></form>', home_url(), $searchfield);

return $searchform;

}

 

Please change "Buscar" (spanish) for Dutch

;)

  • Like 2

Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
nionwebdesign    0
nionwebdesign

Hi Bat,

 

This should go into the functions.php file in the custom template folder right?

I just did that but it still shows the English 'search'...

 

What am I doing wrong?

Share this post


Link to post
Share on other sites
batman    389
batman

Hi again

The function.php file is right.

I don´t know but I suppose that your Dutch .mo need other filter in Dutch

 

Wait for a Professional Moderation Team´s reply, I´m only a newbie.

:)


Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
Jean-Philippe    2
Jean-Philippe

Thank you Batman, it worked well for me!


www.photoreview.fr | www.kankei.fr

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×