Multi language form

entumas 31 Mar, 2016
Hi!

Is it possible to create a multi language form?
If the answer is yes: What is easier to manage? A form with 4 languages or 4 different forms?

Thanks!
GreyHead 01 Apr, 2016
1 Likes
Hi entumas,

Yes. Use the Locales tab to set translation strings. I prefer to use clearly identifiable strings in the Designer tab like ##name## then add ##name##=name ##name##=nom . . . in the Locales tab as this makes it much clearer what has (or hasn't) been translated.

A form with four languages.

Bob
entumas 01 Apr, 2016
Thanks Bod! I understand. But I need curl a little more the curl!

Each language has to send the message to a different e-mail.
This is possible?

In addition, the form has a dropdown to choose whether mail is sent to the user's country or the company headquarters.

How do I do it?

Thanks!
GreyHead 02 Apr, 2016
1 Likes
Hi entumas,

For translating emails please check this FAQ

For setting email addresses please see this FAQ

Bob
entumas 04 Apr, 2016
Thanks Bob, over the second link.
You spent this FAQ to my and I already did run the dropdown.
The dropdown has 2 options: European Customer Support / Country Customer Support
I ask is:
How this dropdown agreed with multilanguage?
GreyHead 04 Apr, 2016
1 Likes
Hi entumas,

What exactly is your question?

You can translate the drop-down text using Locales? To set the correct emails after the form submits you will need to use PHP in a Custom Code action.

Bob
entumas 04 Apr, 2016
How do I customize the code for each language?
GreyHead 04 Apr, 2016
HI entumas,

It depends, where is the information saved?

Bob
GreyHead 06 Apr, 2016
Hi entumas,

That is the code for setting the addresses to be used. It goes: "In the OnSubmit event I have a Custom Code action . . ."

Bob
MaYHeM24 18 Aug, 2016
Hello, not to hijack a thread but I've been using Joomla and WP for some time but I'm a newbie to chronoforms. I've got a contact us form setup using captcha and honeypot. It's all working but this is my first time setting up locales. I guess I'm a little mislead on what part of designer I use to setup the locales for (ru_ru and en_us) locales. Does this translation allow spaces? If I was to setup ##name## as you have mention above, would I put ##name## as the Field Name, Field ID, label? I was thinking Label? Then I setup the locales for en_us as ##name##=name and en_ru as ##name##=имя? I'm not even certain I'm setting up the locales correctly for the strings at this point.

A point in the right direction would be great as I'm sure I can get it from there. Thank you in advance!

MaYHeM24
GreyHead 18 Aug, 2016
1 Likes
Hi MaYHeM24,

First - only use the Locales for visible text i.e. Labels,etc. **Do Not** use locales for Field Names or IDs as that will break your form.

You can use any text you like in a Locale string including spaces and 'special' characters.

Then I setup the locales for en_us as ##name##=name and en_ru as ##name##=имя? Yes - that's correct.

Bob
MaYHeM24 18 Aug, 2016
Hi GreyHead, thank you for the quick response.

I setup ##Name## and ##Contact Us Page## as a labels in the designer tab.
I then went to locales and setup en_us as:
##Name##=Name
##Contact Us Page##=Contact Us Page

I then setup en_ru as:
##Name##=Имя
##Contact Us Page##=Π‘Π²ΡΠΆΠΈΡ‚Π΅ΡΡŒ с Π½Π°ΠΌΠΈ Π½Π° страницС


When I save and test the form I and it goes to the default url: site.domain.com/en/?option=com_chronoforms5&chronoform=Contact-Us

The output for the first label shows: ##Name##
The second does the same: ##Contact Us Page##

Shows the same if I change the site to url: site.domain.com/ru/?option=com_chronoforms5&chronoform=Contact-Us

Any suggestions or info I may post to help aid this problem?

Thank you kindly,

MaYHeM24
GreyHead 19 Aug, 2016
1 Likes
Hi MaYHeM24,

The problem may be with the Locale tags: please try en_gb for English* and ru_ru for Russian.

Bob

* Unless your site is set to use American English as standard which would be a bit unusual.
MaYHeM24 19 Aug, 2016
Hello GreyHead,

Yep, that was the culprit. I changed en_us to en_gb and it's working. Thank You.. This doesn't work for tool tips though it seems? I'm going to keep marching forward and see if I can get this finished. I did have a drop down selection box for countries which worked in the form but sent blank data in the email when submitted. I just changed it to a text box.

Thanks Again, I'll be back I'm sure..

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