Hi there,
I have a site and it's got three languages. I also
have a contact-form with error alerts.
What i wonder is how can i tell the alerts that
are in a separate js-file what language they should pick.
I don't want to create a formcheck file for each language.
You can see the formcheck below.
The lines in the array are the alerts in dutch, but where and how
do i put them in English?
Thanks in advance.
Greetings knoak
_______________ _______________ _______________ _______________
function doForm()
{
Result=""
Warn=new Array(
" · U heeft geen geslacht ingevuld.\n",
" · U heeft geen achternaam ingevuld.\n",
" · U heeft geen e-mail adres ingevuld.\n",
" · Het e-mail adres is incorrect.\n",
" · U heeft geen opmerkingen ingevuld.\n"
)
F=document.form s[0]
genderOK=0
for(x=0;x<F.gen der.length;x++) {
if(F.gender[x].checked==true) genderOK=1
}
if(genderOK==0) Result+=Warn[0]
if(F.lastname.v alue.length<1) Result+=Warn[1]
if(F.email.valu e.length<1) Result+=Warn[2]
if(F.email.valu e.length>0){
Em=F.email.valu e
re=/.+\@.+\..+/
OK = re.exec(Em)
if(!OK)Result+= Warn[3]
WrongMail=1
}
if(F.remarks.va lue.length<1)Re sult+=Warn[4]
if(Result.lengt h>2){
alert("De volgende onderdelen zijn incorrect:\n\n" +Result)
return
}
else{
F.submit()
}
};
I have a site and it's got three languages. I also
have a contact-form with error alerts.
What i wonder is how can i tell the alerts that
are in a separate js-file what language they should pick.
I don't want to create a formcheck file for each language.
You can see the formcheck below.
The lines in the array are the alerts in dutch, but where and how
do i put them in English?
Thanks in advance.
Greetings knoak
_______________ _______________ _______________ _______________
function doForm()
{
Result=""
Warn=new Array(
" · U heeft geen geslacht ingevuld.\n",
" · U heeft geen achternaam ingevuld.\n",
" · U heeft geen e-mail adres ingevuld.\n",
" · Het e-mail adres is incorrect.\n",
" · U heeft geen opmerkingen ingevuld.\n"
)
F=document.form s[0]
genderOK=0
for(x=0;x<F.gen der.length;x++) {
if(F.gender[x].checked==true) genderOK=1
}
if(genderOK==0) Result+=Warn[0]
if(F.lastname.v alue.length<1) Result+=Warn[1]
if(F.email.valu e.length<1) Result+=Warn[2]
if(F.email.valu e.length>0){
Em=F.email.valu e
re=/.+\@.+\..+/
OK = re.exec(Em)
if(!OK)Result+= Warn[3]
WrongMail=1
}
if(F.remarks.va lue.length<1)Re sult+=Warn[4]
if(Result.lengt h>2){
alert("De volgende onderdelen zijn incorrect:\n\n" +Result)
return
}
else{
F.submit()
}
};
Comment