I have a multi-language site.I wish to integrate captcha based on which language is selected.

Suppose if i selected language1 then captcha1
language1 => captcha1
language2 => captcha2
  • what is the difference between the two captchas?
    – M a m a D
    Apr 20 '15 at 14:17
  • Suppose i am using third party "Mollom" and need to setup other one too..
    – mvd
    Apr 21 '15 at 6:15

Well, you should do this in template.php. First check the language then add the captcha based on the language. As an example to do this in webforms:

function THEME_form_alter(&$form, $form_state, $form_id) {
    global $language;
    if($language->name == "ENGLISH")
        if (strstr($form_id, 'webform_client_form')) {
            $form['my_captcha_element'] = array(
                '#type' => 'captcha',
                '#captcha_type' => 'image_captcha/Image',

You can check the language and add the mollom programmatically as well. Follow this link to learn how to add mollom by code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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