I'm using $lang = $_GET['lang'];
and some arrays to change the language of the page.
So my pages URL look like this when I select a language: ...index.php?lang=en
(so my index page never changes neither my jquery files)
(more details in my previous post)
I'm using jQuery validate plugin to validate my form and a custom.js:
$(document).ready(function(){
$("#sendmail").validate({
rules: {
FieldData0: {
required: true
},
FieldData1: {
required: true,
email: true
},
FieldData2: {
required: true
}
},
messages: {
FieldData0: {
required: "Please enter your name"
},
FieldData1: {
required: "Please enter your email address"
},
FieldData2: {
required: "Please enter a message"
}
}
});
})
How can I show different requirement warning for different languages in this case?
Do I have to make a custom.js
for every language and then use php if else statements, is the a better way?