Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-webphotoalbum-git / www / inc / l10nget.inc.php @ 67466a8d

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

1
<?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