User login

Login/Register
To prevent automated spam submissions leave this field empty.

Share

From this page you can share Replace any string in Drupal (5/6), without Locale module to a social bookmarking site or email a link to the page.
Social Web

Replace any string in Drupal (5/6), without Locale module

2
Saturday, February 2, 2008

During a recent Lullboat podcast we mentioned a new feature in Drupal 6 that allows you replace any string in Drupal without using Locale module (thanks Moshe!). Faithful podcast listener Rob Loach took it upon himself to write the String Overrides module that lets you accomplish this task with ease in Drupal 6.

While Lullabots were lamenting the fact that this feature was never in Drupal 5, we realized that it actually could be accomplished. An hour after undertaking the project, the patch was submitted to the String Overrides queue and committed shortly afterwards.

String Overrides accomplishes this in Drupal 5 by imitating the Locale module, and without hitting the database (since variables are cached and pulled up on every request anyway). Since this essentially a hack for Drupal 5, you cannot combine it with Locale module or languages other than English. Here's the key code that makes this possible:

read more

Comments (0)

No comments have been posted yet, why not be the first??
Login or register to post comments