Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
p01-contact : simply add contact forms in your pages
Thanks for making me think, Connie. I just realized the solution. You are actually talking against yourself, when you say "A text between quotes define field title", it means that it's manually multilingual Smile

So here comes my solution, see live:
http://ubytovanisetek.cz//rezervace/ a form in Czech
http://ubytovanisetek.cz/en/rezervace/ the same form in English

Here comes the code.

For the English version...
Code:
<p>
(% contact : teejay.net@seznam.cz, hana.setkova@tiscali.cz, subject! "Subject", email! "E-mail", phone "Phone number", radio "How long would you like to stay?" = "1 week" selected | "2 weeks" | "3 weeks or more", textarea "Please, sends at least a short message here.", select "Preliminary day of arrival" = "1." selected | "2." | "3." | "4." | "5." | "6." | "7." | "8." | "9." | "10." | "11." | "12." | "13." | "14." | "15." | "16." | "17." | "18." | "19." | "20." | "21." | "22." | "23." | "24." | "25." | "26." | "27." | "28." | "29." | "30." | "31." |, select "month" = "January" selected | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December" , captcha "Security code" %)
</p>

... and for the Czech version, which is the default, so I don't have to force my text - it just takes the default, which is Czech.
Code:
<p>
(% contact : teejay.net@seznam.cz, hana.setkova@tiscali.cz, subject!, email!, phone, radio "Jak dlouho byste u nás chtěli být?" = "1 týden" selected | "2 týdny" | "3 nebo více týdnů", textarea "Napište nám, prosím, alespoň krátkou zprávu", select "Předběžný den příjezdu" = "1." selected | "2." | "3." | "4." | "5." | "6." | "7." | "8." | "9." | "10." | "11." | "12." | "13." | "14." | "15." | "16." | "17." | "18." | "19." | "20." | "21." | "22." | "23." | "24." | "25." | "26." | "27." | "28." | "29." | "30." | "31." |, select "měsíc" = "leden" selected | "únor" | "březen" | "duben" | "květen" | "červen" | "červenec" | "srpen" | "září" | "říjen" | "listopad" | "prosinec" , captcha %)</p>

The both form are the same, just different texts. I hope you get the idea how to do it. However, "The message has been sent" messages still have to be translated in the default lang file like this (because you can't change these texts in the form:
Code:
'sent'    => 'E-mail odeslán. / Mail has been sent.',
'error'   => 'Chyba: zpráva nebyla odeslána. / Error: Your message hasn\'t been sent',
'disable' => 'Kontaktní formuláře jsou zakázány.',
'target'  => 'Tento formulář nemá příjemce.',
'token'   => 'Zpráva již byla odeslána. / The message has already been sent.',
...
... etc

I hope this will be enough for you Smile


Edit: I forgot about my second form, it's another and a bit different example. See here
http://ubytovanisetek.cz/kontakt/
http://ubytovanisetek.cz/en/kontakt/

the code for the Czech version is simply
Code:
<p>(% contact %)</p>

and for the English version
Code:
<p>
(% contact : teejay.net@seznam.cz, hana.setkova@tiscali.cz, name! "Name", subject! "Subject", email! "E-mail", phone "Phone number", textarea "Your message", captcha "Security code" %)
</p>

The Czech version lacks the phone number, I'll add it later. So here you are Smile
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply


Messages In This Thread
RE: p01-contact : simply add contact forms in your pages - by TeeJay - 2013-07-04, 17:37:25
askcopy syntax Not Working - by celextel - 2019-05-24, 01:54:40
RE: askcopy syntax Not Working - by celextel - 2019-05-28, 01:51:47



Users browsing this thread: 2 Guest(s)