I would solve that problem with JS.
To remember the language you can set a cookie for the first time, and when the visitor comes back you can read it again.
function setCookie(lang) {
createCookie("language", lang);
}
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
createCookie(name,"",-1);
}
}
On your Babel-Language links you can set something like
<a href="babellink" onclick='setCookie("de")'>German</a>
And then in your pages (at least the starting page) you must read the cookie and redirect the visitor:
<script type="text/javascript">
if (readCookie("language") == "de") {
window.location.replace("[[~[[your-startid-de]]]]");
}
else if (readCookie("language") == "fr") {
window.location.replace("[[~[[your-startid-fr]]]]");
}
else if (readCookie("language") == "en") {
window.location.replace("[[~[[your-startid-en]]]]");
}
else {
window.location.replace("[[~[[your-standard-startid]]]]");
};
</script>
To find out the language even for a fresh visitor you could try to read the browser language.
For example like such:
http://stackoverflow.com/questions/3770513/detect-browser-language-in-php
All in all, this is not a Revo specific solution and I didn't look for an Extra that would do this.
But probabely someone else has a more elegant solution.
Best wishes
Fabian