]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/cfgroot/lang.pl
update Tor to 0.3.5.8
[people/pmueller/ipfire-2.x.git] / config / cfgroot / lang.pl
index c77e0a0665692e0948f265ad2d196ac43d6bdf86..2b09c4a9ff44ab4baf05b3e7439b218c35a28d2b 100644 (file)
@@ -179,4 +179,18 @@ sub FindWebLanguage() {
        return undef;
 }
 
+sub DetectBrowserLanguages() {
+       my $langs = $ENV{"HTTP_ACCEPT_LANGUAGE"};
+       my @results = ();
+
+       foreach my $lang (split /[,;]/, $langs) {
+               # Drop all q= arguments
+               next if ($lang =~ m/^q=/);
+
+               push(@results, $lang);
+       }
+
+       return @results;
+}
+
 1;