Hi,

I have been trying to find a way to translate this string for days now, but no succeed.
I know the problem has been reported several times during the last 2-3 years, but presumably, has not been solved yet.

I am testing locally a multi language site: IT and EN (IT being the default language and Drupal being installed in IT)
I have all the necessary modules for interface and content translations.

My OS is WXP PRO XP3
I use Wampserver 2.0
PHP: 5.2.11
Apache: 2.2.11
MySQL: 5.1.36

What happens is the following:
I enable the contact form and add an item at the primary links, I call it "Contact Us".
Path: contact
Language selection: All languages
(I have tContact module enabled)

Now, if I go to the translate interface, I see the following:

Built-in interface Puoi lasciare un messaggio usando il form di contatto qui sotto.
/it/contact (then a strikethrough it)
Original text: "Puoi lasciare un messaggio usando il form di contatto qui sotto."
Italian:

What I would expect to see is:

Original text: "Puoi lasciare un messaggio usando il form di contatto qui sotto."
English:

In fact, if I enter the EN translation where Italian is expected, I get the Italian message in the EN contact form and vice versa.

I also tried to use the Stringoverrides module in combination with the modification to line 41 in the contact.pages.inc file , but no way, it doesn't work.

Hope you can solve this problem in the next release and help me to find a workaround.

Thank you!
Alex

Comments

Metallo’s picture

Anybody?

workonwomen’s picture

Till now this worked fine, but now I am failing too.

replace

...
$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.'))));
...
Metallo’s picture

Hi,

I replaced as suggested, no change.
For me the real problem is the fact that the translate interface takes the source (which is in IT) and proposes a translation to IT and NOT to EN.

Hope somebody else can find a solution to this bug.

Cheers
Alex

jeyro’s picture

Is it possible that at some time the default language got confused? During my first translations (and adding oder modules to support translation) the default language switched by itself. This happended several times and I still don't know exactly how/why it happens. One suspect is the installation of a language related module, while in a non-default language. For now, I always make sure that I start out in default language for anything I do regarding translations.

But - danger: Note the mentioned warnings on changing default language. if you start switching it now, confusion might get bigger (so better make a backup first). I'm not sure if you can afford to go back and reinstall from a backup that did not have the problem (sorry, I know that is a bit drastic, there may be other solutions).

Finally I'm also not able to translate the comment form text (among others). I've described the issue in http://drupal.org/node/474102.

rfay’s picture

I translate this successfully on my site using I18n module's multilingual variables. You have to use I18n module, and set the form in question to be a multilingual variable. You do this in the settings.php.

Here are my i18n_variables from that site, from my settings.php. I'm quite sure you want the contact_form_information.

/**
* Multilingual settings
*
* This is a collection of variables that can be set up for each language when i1
8n is enabled.
* These are the basic ones for Drupal core, but you can add your own here.
*/
$conf['i18n_variables'] = array(
  'site_name',
  'site_footer',
  'site_slogan',
  'site_mission',
  'anonymous',
  // Different front page for each language
  // 'site_frontpage',
  // Primary and secondary links
//  'menu_primary_links_source',
//  'menu_secondary_links_source',
  // Contact form information
  'contact_form_information',
  'user_mail_password_reset_body',
  'user_mail_password_reset_subject',
  'user_mail_register_admin_created_body',
  'user_mail_register_admin_created_subject',
  'user_mail_register_no_approval_required_body',
  'user_mail_register_no_approval_required_subject',
  'user_mail_register_pending_approval_body',
  'user_mail_register_pending_approval_subject',
  'user_mail_status_activated_body',
  'user_mail_status_activated_subject',
  'user_mail_status_blocked_body',
  'user_mail_status_blocked_subject',
  'user_mail_status_deleted_body',
  'user_mail_status_deleted_subject',
  'user_picture_guidelines',
  'user_registration_help',
  'user_location_google_key',   // So that we get a different item for each subd
omain
);
workonwomen’s picture

Sorry were on a different ftp site... That's why it did not worked till I found my fault, so now this works fine:
http://szentgyorgyvolgy.hu/de/contact
http://szentgyorgyvolgy.hu/contact

;-)

workonwomen’s picture

Sorry were on a different ftp site... That's why it did not worked till I found my fault, so now this works fine:
http://szentgyorgyvolgy.hu/de/contact
http://szentgyorgyvolgy.hu/contact

;-)

Metallo’s picture

Rfay,

I followed your suggestion, I copied/pasted your snippet into my settings.php file, (the variables you have included are good for me too) and finally the IT contact form shows up in IT, the EN one in EN language! :)

Thanks very much, I have understood how it works and will use the DB to check the variables and apply the same system in needed.

Hope D7 will make the contact form fully "localizable" by default, I have read many posts about this issue which means many people have the same problem.

Ciao
Alex

gpk’s picture

Category: bug » support
Status: Active » Fixed

Sounds like the original question is fixed then :)

fliangz’s picture

@workonwomen

how do you actually manage to change the "Contact" primary menu name ? i have been using tContact module to change the category for each contact language, change the additional information for each contact language by setting up i18n_variables in settings.php, however i'm just left out with "Contact" menu name.

The problem i reckon there is only one primary link menu called "Contact", and you can't change the language from there, do we have to manually change it from the database i wonder ?

fliangz’s picture

solved the problem, don't bother :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

candelas’s picture

Category: support » bug

Hello

I get this problem also.
I18n, transllation_overview and the transllation_table modules

In the Translate interface if i search, i get the string as transllated but when i load the page, it doesn't work.
I have the last versions on the modules and drupal.

any advice, please? :)

rfay’s picture

Category: bug » support

@candelas, please see #5

candelas’s picture

sorry rfay
i thought that maybe it was solved with the new version of drupal.
it would be great that it would not need of having to change settings.php
thanks for your work

Firewolf’s picture

Version: 6.14 » 6.17
Category: support » bug
Status: Closed (fixed) » Active

This bug is still active.

I use Drupal 6.17 with the Locale module and the Dutch (NL) translation. I have no need for the i18n features, so the above mentioned solution (#5) doesn't help me. The string is translated in the database. The system just doesn't show it.

gpk’s picture

For a single language site your best bet is probably to use enter your required text under "Additional information" at admin/build/contact/settings

Firewolf’s picture

That's what I did after I posted the reply. I'm just wondering now whether it is a bug or not. Are these kind of variables supposed to be translated automatically or not?

gpk’s picture

I've not used the multilingual features in anger (yet!), I think what is going on here is that although the text "You can leave a message using the contact form below" appears in the user interface when you view the contact form, it can be defined or changed by site admins, so it is not quite the same as the majority of the user interface text which is completely fixed and wholly defined in code. To translate Drupal variables (or rather to have variables that can have different values in each language on your site) you have to use i18n.

If you look at http://api.drupal.org/api/function/contact_mail_page/6, which generates the contact form, you will see that the text "You can leave a message using the contact form below" only gets translated if no value is stored for the variable contact_form_information. This is potentially a bit confusing because if you submit the global contact form settings page (e.g. to set the hourly threshold or change the default status of users' personal contact forms) then you cause the contact_form_information variable to be created, so if it was previously being translated then it no longer will be. I've not looked anywhere else in core but I would expect that this pattern is the same as is used elsewhere. If so then this is probably something of a weakness of the multilingual capabilities. If nothing else it is rather confusing!

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.