Drupal Quick Tip: Overriding strings

Photo CC-BY by smithser

Drupal comes with its own terminology and sometimes the strings returned to the user are not quite the vocabulary he or she uses. For example, a small library might refer to the people who have their library card as patrons or members. If a module to manage those users uses a different term this then can cause inconsistency, confusion, etc. One can, of course, just change the strings within the given contrib module but then upgrading becomes a tedious process of merging changes by hand. There is a much nicer solution available.

String Overrides

Within settings.php one can specify strings which should be overriden, so that a consistent word choice can be implemented without having to mess up core or contrib. The OpenAtrium documentation has a nice explanation of how to use this.

If you don’t mind adding one more contrib module to your installation, there is also a gui solution to do this for you, called the String Overrides module.