slitaz-forge annotate pro/index.cgi @ rev 612
tank, pangolin: add console link
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 03 18:29:16 2016 +0100 (2016-02-03) |
parents | 99a3dfd92a89 |
children |
rev | line source |
---|---|
pankso@106 | 1 #!/bin/sh |
paul@111 | 2 # Content negotiation for SliTaz Network |
pankso@106 | 3 # |
pankso@106 | 4 |
pankso@106 | 5 IFS="," |
pankso@106 | 6 for lang in $HTTP_ACCEPT_LANGUAGE |
pankso@106 | 7 do |
pankso@106 | 8 lang=${lang%;*} lang=${lang# } lang=${lang%-*} |
pankso@106 | 9 [ -d "$lang" ] && break |
pankso@106 | 10 done |
pankso@106 | 11 unset IFS |
pankso@149 | 12 [ -d "$lang" ] || lang="en" |
pankso@106 | 13 |
pankso@106 | 14 echo "Location: $lang/" |
pankso@106 | 15 echo "" |
pankso@106 | 16 |
pankso@106 | 17 exit 0 |