slitaz-forge view pro/index.cgi @ rev 711

Update pangolin
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jan 01 18:26:56 2020 +0100 (5 months ago)
parents 99a3dfd92a89
children
line source
1 #!/bin/sh
2 # Content negotiation for SliTaz Network
3 #
5 IFS=","
6 for lang in $HTTP_ACCEPT_LANGUAGE
7 do
8 lang=${lang%;*} lang=${lang# } lang=${lang%-*}
9 [ -d "$lang" ] && break
10 done
11 unset IFS
12 [ -d "$lang" ] || lang="en"
14 echo "Location: $lang/"
15 echo ""
17 exit 0