Soluzione funzionante:
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript">
function Redirect(val){
var URL = location.href;//recupero la url della pagina
var linguage = val.options[val.selectedIndex].value;//recupero il valore della select
var folder = location.href.split("/")[5];//separo la url contando i backslash che partono da 0
var page = URL.replace(folder,linguage);//sostituisco la cartella
alert(page)
//location.href = 'http://www.miosito.com/folder/'+val+'/'+page;
}
</script>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
</head>
<body>
<select style="width: 169px;" id="language-select-list" onchange="Redirect(this)">
<option selected="selected" value='en'>Eng</option>
<option value='es'>Esp</option>
<option value='fr'>Fra</option>
</select>
</body>
</html>
Attenzione ai backslash della url http://..... devi contarli partendo da 0, per quanto concerne le lettere "strane" dovrebbe essere un problema di codifica (charset) altrimenti accorciale come ho fatto io.