Archived

This topic is now archived and is closed to further replies.

  • 0

Translating 'search In Navbar And Widget

Question

Posted · Report post

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

4 answers to this question

Posted · Report post

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

;)

2 people like this

Share this post


Link to post
Share on other sites

Posted · Report post

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

Posted · Report post

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.

:)

Share this post


Link to post
Share on other sites

Posted · Report post

Thank you Batman, it worked well for me!

Share this post


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