hello togeter.
may i ask you if anybody knows how to get the contact form categories translated? (working with 4.7.4 and the i18n modules).
thanks in advance for any hint and best regards
bormay

Comments

harcesz’s picture

got the very same problem

zmove’s picture

Same, but I'm using drupal 5...

Reflexe’s picture

I am building a 4 language site with categories in the contact form, I am using drupal 5 and the localizer module and cannot find the way to translate the categories. If someone could help I would really appreciate it.

lendoka’s picture

Hello! same problem with drupal 5...

botum’s picture

I have the same problem and couldn't solve it.

Without knowing too much, I tryed adding this code:

$conf['i18n_variables'] = array(
    'cid'
);

Which is the id of the category select, but it didn't made any change.

Hoesh’s picture

I've created a simple module and using form altering, dont know if it work for Drupal4.

Contents of %modulename%.module:

<?php

function %modulename%_form_alter($form_id, &$form)
{
	if ($form_id == "contact_mail_page")
	{
		$categories = $form['cid']['#options'];
		if (count($categories))
		{
			foreach ($categories as $key => $category) $tCategories[$key] = t($category);
			$form['cid']['#options'] = $tCategories;
		}
	}
}

?>
alexbk66-’s picture

If anybody still looking for the solution, I modified the above code for D6:

function %modulename%_form_alter(&$form, $form_state, $form_id)
{
    if ($form_id == "contact_mail_page")
    {
        $categories = $form['cid']['#options'];
        if (count($categories))
        {
            foreach ($categories as $key => $category) $tCategories[$key] = t($category);
            $form['cid']['#options'] = $tCategories;
        }
    }
}

There's also tContact.module for that, but I haven't tried it.