Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-webphotoalbum-git / data / www / inc / l10nget.inc.php @ 7938c308

Historique | Voir | Annoter | Télécharger (323 octets)

1 67466a8d Eric Seigne
<?php
2
3
function get_lang_from_agent($accept) {
4
5
        $acceptarr = explode("," , $accept);
6
        foreach ($acceptarr as $lang) {
7
                //get rid of trailing garbage
8
                $lang = ereg_replace("^(.*)\;.*","\\1", $lang);
9
                if (is_dir("l10n/$lang")) {
10
                        return $lang;
11
                        exit;
12
                }
13
                //no translation for accept language
14
                return "en";
15
        }
16
}
17
?>
Redmine Appliance - Powered by TurnKey Linux