New Podcast

Posted Tuesday, January 31 at 3:28 pm
  Thomas Turnbull (tom_o_t on drupal.org) and Alan Palazzolo (zzolo on drupal.org) join Mike Anello to talk about their new book from O’Reilly Media, Mapping with Drupal. Mike’s usual co-hosts, Andrew and Ryan, were both unable to participate in the podcast, leaving Thomas and Alan subject to Mike’s long-winded (but extremely interesting by some accounts) questions.
Download Podcast 73
DrupalEasy_ep73_20120131.mp3
Syndicate content

NEWSLETTER

Stay informed on our latest news!

Syndicate content

Testimonial

Thanks for a well-organized, straightforward, and information-packed workshop. Thank you for covering the basics so concisely and clearly. It was a good experience for me. I'm looking forward to taking more workshops from DrupalEasy.

Who are we?

DrupalEasy is the collective expertise of Ryan Price and Michael Anello, who joined forces to provide training and consulting services worldwide. Read all about them and what they can do.

What is Drupal?

Drupal is a free, super-powerful content management system for sites that require information posting and collection, including blogs, forums, videos, photos, and databases of information. We think it is the best platform available. Here's why...

Why Drupal?

More and more savvy organizations are going with Drupal for content management, and its no mystery why. It’s free, flexible, and easy to maintain for small or large volume sites. Learn more...

I Just Want to Change That One Word!

If you develop Drupal sites for clients, then you've no doubt been requested to change some of the default language found in Drupal core and/or contributed modules. For example, instead of "My account", your client wants it to read "User info". Or instead of "Create content", they request "Add stuff".

When I first started developing Drupal site a few years ago, I would actually (the faint of heart should avert your eyes) hack core or the modules to get it done. I very quickly learned my lesson and changed over to the Locale module (this was in the days of 4.7). While this was better, it was meant for full language translations and not for site-specific custom text.

Luckily, with Drupal 6, we have the String Overrides module. This module was intended exactly for this purpose - to change Drupal's default text to suit a particular site's needs. It still uses Drupal translation system underneath, but it is a little bit more lightweight than a full translation modules.

Be warned, though, it can still mess with you. For example, I recently wanted to change the term, "List price" in Ubercart to "MSRP". When I added this change to the String Overrides module configuration, nothing happened. I looked again at where "List price" was being printed out and it looked like this: "List price: $400". So, I tried entering "List price:" and "MSRP:" (note the colon) - still nothing. Finally, I tried "List price: " and "MSRP: " (note the colon and the space) - luckily that worked. Depending on how the string is defined in the module, you may have to be very particular in how you try to translate it.

Trackback URL for this post:

http://drupaleasy.com/trackback/211
No votes yet

More Quicktips


3 comments

Guest wrote 23 weeks 2 days ago

No luck

I know this is a REALLY old thread, but I am having the problem of changing List Price to Original Price too.

So far I've had no joy!

I tried your suggestion but no luck.

Do you have any further info on this one?

Cheers,

Rebecca

user picture
ultimike wrote 23 weeks 2 days ago

search the code

Rebecca,

The only other advice I can offer is to search the code for the string you want to change and see exactly what is being passed in the t() function. For example, it might be something like t('List price : '). Once you find it, you'll know exactly how the string is formed.

-mike

Guest wrote 2 years 1 week ago

thanks!

I was mid-editing some core files in Drupal 6 to change the display of "username" to "your name" when I tried one last desparate search and found your post. Thank you for this headache relief. :)

Syndicate content