I had a look around and couldn't see if this had been asked before so decided to create a new question. Please delete this if this is a duplicate.

I'd like to customise the status messages that appear to users when they trigger the captcha and profanity filter, as the default messages are quite long winded. My experience with Drupal is VERY limited and am not sure if there is a module specific hook for overriding such settings, or if this is relating to core/a core hook.

I've had a look at the mollom.module code and notice that the message is being set at line 2220

form_set_error('mollom', t('Your submission has triggered the profanity filter and will not be accepted until the inappropriate language is removed.'));

My question being - is there a simple hook I can use to access this? Perhaps in my preprocessor functions? What is the 'Drupal way' of modifying this message?

If it is of any relevance I am using the Entityform module for my form. Please let me know if you need me to provide additional information.

Thanks for your help in advance.

  • UPDATE: I've found the drupal hook for accessing messages: theme_preprocess_status_messages() I'm working through this now and how I can go about modifying what comes out of Mollom - will keep everyone posted. Sep 22, 2015 at 23:34

1 Answer 1


If you look in the settings.php for your site, there should be a template for overriding strings in the interface (anything in the t() function).

You would add something like this to the settings.php file:

$conf['locale_custom_strings_en'][''] = array(
  'Old string'      => 'New string',

I haven't used it, but there's a module that makes this easier: String overrides.

  • Thanks for your response! I managed to do it with regular php but my solution was rather gross. Will take a look at this module! Sep 24, 2015 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.