Hi Ikram,
The better option is that, you needs to add your function "getLanguage()" on every page, but with different url in the window.open() function.
Let say for Contact page add your function as follow..,
function getLanguage() {
if (document.getElementById('language').value == 'Arabic') {
window.open("ContactUsAr.aspx?lan=ar_Ar", '_self');
return true;
}
else {
window.open("Contactus.aspx?lan=en_Us", '_self');
return true;
}
}
Look at the Url I set. So you can proceed further this way.