drupal tcontact module http://drupal.org/project/tcontact 6.x-1.2 on drupal 6.25 2012-08-10
Required: The core contact module and the i18n internationalisation module.
Main function: Translate the contact page to one or more other languages.
Example function: The finicky contact page doesn't want to be translated like all other pages. The tcontact module gets this done. The webform module can act as an alternative contact page, while for its translation it needs a similar translation helper module. For the site i am working on the simple contact page + tcontact is just fine.
Manage: Enable in Site building > Modules > Multilanguage There are no permissions to set Go to Site building > Contact form Click edit for the first category and see the new Language drop down box
The consequence of what you see is, that for each category you have made earlier, you can now make several language versions. I have only one category, contact-public. I rename this to contact-en and choose English from the Language drop down. Then I make another category, contact-nl and choose Dutch from the language drop-down. I now have two contact pages, each one language specific and I can have the language specific contact mails sent to different email addresses, if I want to. But it's not done yet.
We now have to add a multilingual variable to be able to translate the "Additional information" that I entered earlier as an introduction to the form. Add this the bottom of settings php:
$conf['i18n_variables'] = array( // Contact form details 'contact_form_information', );
It adds the bold text: This is a multilingual variable. beneath the Additional information window of the contact settings page. This means that you can now translate the content of "Additional information". But it is done much differently from how you translate a normal page.
Note that the "Multilingual variable" translation is the third way to translate things in Drupal. The first is by "Content translation" (Language drop down boxes and content translation tabs), the second is by "String searches" and this is number three, by adding translation variables to settings.php. In fact you can add a whole lot of variables in settings.php; I have more than 45, including "Site information" details, email notifications and Ubercart. Understand well that this translation works entirely differently from the other two ways. Just don't get confused.
You need the language switcher for this to work:
- Go to Site building > Contact form > Settings and see the content of the "Additional information" in the default language. You do not need a translation here.
- Click the language switcher for the other language. Make sure you are in the other language by checking the path in the address bar and any other indications. In the "Additional information" box where you see the text in default language, translate and discard the old original version. Save the content with the new translation. Done. Repeat for other languages as needed.
Note again that this works more or less oppositely from "Content translation".
Field names The tcontact module's work is done now. But the contact page is not finished. The field names "Your name", "Your e-mail address", "Subject" and "Message" still need to be translated. This is done with the string search in Site buidling > Tranlsate interface > Search. Search for: Your name. It will come up as search result. Click edit and translate the term to the other language. Note that in this case it was not necessary to include the colon : in the search string. Do the same for the others. Done.
Contact page H1 heading This too can be translated. Use string translation. Site building > Translate interface > Search. This may be trial and error if you have "Contact" in the menu. Look for a reference to "node/x", in my case it was "node/3"; that doesn't make any sense at all, but that's where it was and where it worked. Just undo translations that went to the wrong place.
Contact through the menu You'll need a link to the contact page in the menu somewhere. There is different ways to do this. I suggest to create menu items per language, this gives you Contact. Kontakt, etc. per language. In the path just specify "contact" and the system will sitch automatically to the correct language contact page.
All's well that works well. I'm just glad it is and it does.