Translation of forms and mail

sander00 22 Jun, 2010
I created a mail form in English and translated it to French. No problem so far. Created a mail template to send the form data by mail. Works too.

Trouble is: The mails sent in the English version work, but in the French version the mail fields are empty (except one "e-mail", which is not translated). Apparently the mail data fields name (i.e. inside the "{}") also need to be translated, but how do I do that? Tried the language module, but that does not work for data field names in the mail template.

One other thing: The error messages in the form can be translated, but the message on the top saying "wrong verification code" (if applicable) is not translated, neither is the "after post" message.

Anyone experience with this?
sander00 22 Jun, 2010
One more note: In the mail sent from the French language form the field data in the mail contains the field names i.e. "{_name}" rather than it's contents.
GreyHead 23 Jun, 2010
Hi sander00,

Is this multi-language or just a French language form?

If it's a single language then there should be no problems.

Do not translate the input names inside the brackets {}. They should not contain anything except a-z,A-Z,0-9 and underscore and must begin with a letter (not an underscore). They must be identical in the form and the e-mail template.

Bob
sander00 23 Jun, 2010
Hi Bob,

It is one form, translated with the language plug-in.

Yes... that's it. The field names them selves are also translated. I did not expect that.
Changed the names and now the original English and the French translation's mails work.

Now I'll just have to find a way change the other two messages...

Sander
GreyHead 23 Jun, 2010
Hi sander00,

I'm still not clear if this is a single language form in French only? If it is then you can add a custom error message on the Anti Spam tab in 'Error Message'

The 'After Post' message usually comes from one of the OnSubmit boxes so you can translate those (or use a PHP switch if it's bi-lingual).

Bob
sander00 23 Jun, 2010
This is a single form in English, being translated to French with the Language plug-in.

Sander
GreyHead 23 Jun, 2010
Hi sander00,

If it's a single language for then you don't need to use the multi-language plugin*. You can just put the French phrases in place of the English in the Form HTML, the OnSubmit boxes and the various message boxes.

Bob

* The plugin will work OK but isn only really needed if you want the form to switch with the language of the user.
sander00 23 Jun, 2010
Decided to split the form into two: one English and one French, much easier to handle all translations. Letting JoomFish to decide which one to show. Works perfectly now.

Sander
This topic is locked and no more replies can be posted.