Changing "Search this site" text in Drupal

Located in:

I like Drupal a lot and you could say I am committed to it, but just like in any relationship, there are little things that make you scratch your head. Changing default site text ("Search this site", "Read more" etc.) is one of those things. It should be simple. Perusing Drupal forums and seeing some of the solutions people have resorted to (ie. hacking core, rolling a custom module just to implement hook_form_alter) makes you wonder if this CMS isn't just a bit too complex.

String Overrides to the rescue!

In my case, I had spent more time than necessary trying to override the text with functions in my template.php file and it was late so I finally gave up, determined to conquer the problem in the morning. Fast forward 8 hours, it was morning and I was just about to create a new module called "Pesky Strings" when I was struck by common sense and decided to see what other modules are out there. (I sometimes feel wading through pages of Drupal modules is less efficient than just rolling my own.)

Since my module was about to be called "Pesky Strings", I even used "pesky strings in drupal" as my google search and luckily, the string override module popped up.

Two things immediately caught my attention:

  1. The module description was well-written
  2. There was mention of Lullabot which is a well-known site to Drupalers

That was enough for me. I installed the module and changing "Search this site" was as easy as entering "Search it up". Not much of an improvement in text really, but easily being able to do it was the point!

0
No votes yet
Your rating: None

Social mediatize it!

Twitter Twitter Facebook Facebook     
How about that! I'm a Drupal association member.

Attention IE user!

It turns out you are using an outdated browser and my site might look a bit weird for you. (images are off colour, text gets cut off, layout is wacky) This is because your browser does not implement web standards. Please consider an upgrade.

Alternatively, you can try other browsers like Google Chrome, Mozilla Firefox, Opera or Apple's Safari. Every web developer on the planet will thank you! (and that's not really an exaggeration)

Hide this notice for the rest of your visit