php - Alter messages in Drupal 7 -
there couple of messages in drupal. when there php warning, error message raised, module can raise messages drupal_set_message(). question is: there way alter these messages? example replace every 'a' 'b' in every message.
thanks!
while there no message alter on set, can change them on display via hook_preprocess_status_messages
, see http://api.drupal.org/api/drupal/includes--theme.inc/function/theme/7 on preprocess , http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_status_messages/7 .
edit: can try string overrides check http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/t/7 , in short $conf['locale_custom_strings_en']['some message'] = 'some messbge';
english, change _en
else if it's not english.
Comments
Post a Comment