website annotate index.php @ rev 1298

Some clean-up (rm old symlimks) and content negociation in /index.php
author Christophe Lincoln <pankso@slitaz.org>
date Fri Mar 24 23:15:18 2017 +0100 (2017-03-24)
parents de926b623824
children
rev   line source
pankso@1298 1 <?php
pankso@1298 2
pankso@1298 3 $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
pankso@1298 4
pankso@1298 5 switch ($lang) {
pankso@1298 6 case "bs":
pankso@1298 7 echo "<meta http-equiv='refresh' content='0; URL=bs/'>";
pankso@1298 8 break;
pankso@1298 9 case "cn":
pankso@1298 10 echo "<meta http-equiv='refresh' content='0; URL=cn/'>";
pankso@1298 11 break;
pankso@1298 12 case "da":
pankso@1298 13 echo "<meta http-equiv='refresh' content='0; URL=da/'>";
pankso@1298 14 break;
pankso@1298 15 case "de":
pankso@1298 16 echo "<meta http-equiv='refresh' content='0; URL=de/'>";
pankso@1298 17 break;
pankso@1298 18 case "en":
pankso@1298 19 echo "<meta http-equiv='refresh' content='0; URL=en/'>";
pankso@1298 20 break;
pankso@1298 21 case "es":
pankso@1298 22 echo "<meta http-equiv='refresh' content='0; URL=es/'>";
pankso@1298 23 break;
pankso@1298 24 case "fr":
pankso@1298 25 echo "<meta http-equiv='refresh' content='0; URL=fr/'>";
pankso@1298 26 break;
pankso@1298 27 case "id":
pankso@1298 28 echo "<meta http-equiv='refresh' content='0; URL=id/'>";
pankso@1298 29 break;
pankso@1298 30 case "it":
pankso@1298 31 echo "<meta http-equiv='refresh' content='0; URL=it/'>";
pankso@1298 32 break;
pankso@1298 33 case "ja":
pankso@1298 34 echo "<meta http-equiv='refresh' content='0; URL=ja/'>";
pankso@1298 35 break;
pankso@1298 36 case "pt":
pankso@1298 37 echo "<meta http-equiv='refresh' content='0; URL=pt/'>";
pankso@1298 38 break;
pankso@1298 39 case "ru":
pankso@1298 40 echo "<meta http-equiv='refresh' content='0; URL=ru/'>";
pankso@1298 41 break;
pankso@1298 42 default:
pankso@1298 43 echo "<meta http-equiv='refresh' content='0; URL=en/'>";
pankso@1298 44 break;
pankso@1298 45 }