Redirect if the browser/window language is one of the supported
|Reported by:||fgdrf||Owned by:||fgdrf|
in case of the browser has set en, de, el, jp, es or pl the relevant index page should be loaded by redirecting. IMHO this should only happen if the user came from an other side .
the js-File can access the language environment:
var supported_languages=["el", "es", "pl", "en", "de", "jp"]; var langCode = navigator.language || navigator.systemLanguage; var lang = langCode.toLowerCase(); lang = lang.substr(0,2); // check last page and if it's not live.osgeo.org and // browser language is one of the supported and // requested page was index.html, // redirect to the relevant <lang>/index page // TODO code here
Change history (14)
comment:1 by , 11 years ago
|Summary:||Redirect if the browser/window is one of the supported → Redirect if the browser/window language is one of the supported|