Quantcast
Channel: Lecciones Prácticas » Drupal
Viewing all articles
Browse latest Browse all 22

Translate “Contact form” module Drupal [SOLVED]

$
0
0

The crappy way

Delete the “additional information” text in admin/build/contact/settings

The easy way

Just download tContact module, and add these lines to your settings.php file.

$conf['i18n_variables'][] = 'contact_form_information';
$conf['i18n_variables'][] = 'contactforms_information';

The hard way

After hours of research, I’ve finally come up with a default core solution that I’d like to share with everyone on how to translate the Contact form module that comes with Drupal in Drupal 6.x.

Basic Instructions:

Make sure your Contact form module is enabled first, of course.

Go to drupal\modules\contact and open the file contact.pages.inc.
Go to line 41.

Replace the code…

$form['contact_information'] = array(‘#value’ => filter_xss_admin(variable_get(‘contact_form_information’, t(‘You can leave a message using the contact form below.’))));

…with:

$form['contact_information'] = array(‘#value’ => t(filter_xss_admin(variable_get(‘contact_form_information’, ‘You can leave a message using the contact form below.’))));

Once replaced, save the page.
Next, install the module String Overrides.
Once installed, go to the String Overrides main page on your Drupal site under admin/settings/stringoverrides and click on the preferred language you would like to translate your contact form text to.
Make sure you originally replace “Contact” with the appropriate translation for “Contact” under your preferred language, and also for the text “You can leave a message using the contact form below.” Keep in mind that if you have changed that text, then you should translate the text that you changed it to instead.

After all this has been done, you’ll have a sweet translated contact form.

Refer to this link and this other for further details.


Viewing all articles
Browse latest Browse all 22

Trending Articles