Amazon S3 redirect based on browser language -


i've multi language website. want redirect english users /en , spanish users /es.

currently i'm doing via javascript, feel there better way.

<html> <body> <script type="text/javascript">     var language = window.navigator.userlanguage || window.navigator.language;     if (["es","en"].indexof(language) != -1){         window.location.replace(language);         }     else{         // other languages go en         window.location.replace("/en");     } </script> </body> </html> 


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -