Home ›
Overriding a string the second-simplest way in Drupal 7Overriding a string the second-simplest way in Drupal 7
Submitted by Benjamin Melançon on December 11, 2012 - 10:52pm
Here's the situation: You don't need administrator-customizable strings like the String Overrides modules provide, but you'd like the changes in a more share-able (or consistently version controlled) place than settings.php, which details an easy $conf way of doing string overrides.
Well, here's how to do it with a variable set function that can go in a module's install or update hook:
<?php
variable_set("locale_custom_strings_en", array('' => array("Existing string." => "Replacement string.")));
?>
Comments
Overriding
Hey buddy thanks for the code this will help in my project. custom made to order rugs
Post new comment