Short Description
Methods
- Edit
settings.phpfile - String Overrides module
- Use
hook_boot()
settings.php filehook_boot()settings.php for the site in question.drupal_root_folder/sites/default/settings.php# $conf['locale_custom_strings_en'] = array(
# 'forum' => 'Discussion board',
# '@count min' => '@count minutes',
# );
$conf['locale_custom_strings_en'] = array(
'Old string 1' => 'New string 1',
'Old string 2' => 'New string 2',
);
For Drupal 7 the code is the same except for an additional set of square brackets:
$conf['locale_custom_strings_en'][''] = array(
'Old string 1' => 'New string 1',
'Old string 2' => 'New string 2',
);
In order to override other languages, you can do it like below. Pay attention that the input string has to be English and the output the translated new string. Multiple languages can be placed below each other in one settings.php file.
$conf['locale_custom_strings_en'][''] = array(
...
);
$conf['locale_custom_strings_nl'][''] = array( // nl Is the Dutch language code
'Old English string 1' => 'New Dutch string 1',
'Old English string 2' => 'New Dutch string 2',
);