Subversion Repositories ALCASAR

Rev

Rev 886 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log

<?php
/*
Fichier de gestion des langues
Pour l'utilisation de ce fichier mettre une variable
$origine égal au nom du fichier php contenant l'include sans l'extension
avant l'include du fichier langues.php
*/
// Choix de la langue
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
//-------------------
// En fonction de la langue et de la page d'appel remplissage des variables
switch ($Language){
        case 'fr':
        //Français
                switch ($origine){
                        //Administration
                        case 'user_new':
                                $l_title = "Cr&eacute;ation d'un usager";
                                $l_frame_top = "Gestion des usagers";
                                $l_frame = "Cr&eacute;ation d'un usager";
                                $l_user_exist = "existe d&eacute;j&agrave;";
                                $l_login = "Identifiant";
                                $l_password = "Mot de passe";
                                $l_passwd_gen = "g&eacute;n&eacute;rer";
                                $l_group = "Groupe";
                                $l_group_empty = "La liste des groupes est vide";
                                $l_name = "Nom et pr&eacute;nom";
                                $l_email = "Adresse de couriel";
                                $l_lang_ticket = "Langue du ticket";
                        break;
                        case 'group_new':
                                $l_title = "Cr&eacute;ation d'un groupe";
                                $l_frame_top = "Gestion des groupes";
                                $l_frame = "Gestion des groupes";
                                $l_group_create = "Cr&eacute;er un groupe";                     
                        break;
                        }
        break;
        default :
        //English
                switch ($origine){
                        //Administration
                        case 'user_new':
                                $l_title = "Create a user";
                                $l_frame_top = "Users admin";
                                $l_frame = "Create a user";
                                $l_user_exist = "already exist";
                                $l_login = "Login";
                                $l_password = "Password";
                                $l_passwd_gen = "generate";
                                $l_group = "Group";
                                $l_group_empty = "The group list is empty";
                                $l_name = "Surname and name";
                                $l_email = "Email Address";     
                                $l_lang_ticket = "Voucher language";    
                        break;
                        case 'group_new':
                                $l_title = "Create a group";
                                $l_frame_top = "Groups admin";
                                $l_frame = "Groups admin";
                                $l_group_create = "Create a group";                     
                        break;                  
                        }
        break;
        }
//Langue du Ticket d'impression en fonction de la liste déroulante
$langue_imp=$_POST["langue_imp"];
if($origine=='user_new'){
        switch ($langue_imp){
                case 'fr':
                        $l_title_imp = "TICKET ACC&Egrave;S INTERNET";
                        $l_login_imp = "Utilisateur :";
                        $l_password_imp = "Mot de passe :";
                        $l_session_timeout_imp="Dur&eacute;e d'une session :";
                        $l_max_daily_session_imp="Dur&eacute;e journali&egrave;re :";
                        $l_max_monthly_session_imp ="Dur&eacute;e mensuelle :";
                        $l_expiration_imp="Date d'expiration :";
                        $v_illimit="Illimit&eacute;e";
                break;
                case 'de':
                        $l_title_imp = "GUTSCHEIN SPRACHE";
                        $l_login_imp = "Login :";
                        $l_password_imp = "Passwort :";
                        $l_session_timeout_imp="Dauer der Sitzung :";
                        $l_max_daily_session_imp="Stunden t&auml;glich :";
                        $l_max_monthly_session_imp ="monatlich Dauer :";
                        $l_expiration_imp="Verfallsdatum :";
                        $v_illimit="Unbegrenzt";
                break;
                case 'nl':
                        $l_title_imp = "ONTVANGST INTERNET";
                        $l_login_imp = "Gebruikers :";
                        $l_password_imp = "Wachtwoord :";
                        $l_session_timeout_imp="Sessieduur :";
                        $l_max_daily_session_imp="Dagelijkse uren :";
                        $l_max_monthly_session_imp ="Maandelijkse duur :";
                        $l_expiration_imp="Vervaldatum :";
                        $v_illimit="Onbeperkte";
                break;
                case 'es':
                        $l_title_imp = "BONO INTERNET";
                        $l_login_imp = "Usuario :";
                        $l_password_imp = "Contraseña :";
                        $l_session_timeout_imp="Duraci&oacute;n de Sesi&oacute;n :";
                        $l_max_daily_session_imp="Horas diarias :";
                        $l_max_monthly_session_imp ="Duraci&oacute;n mensual :";
                        $l_expiration_imp="Fecha de caducidad :";
                        $v_illimit="Ilimitado";
                break;
                case 'it':
                        $l_title_imp = "RICEVIMENTO INTERNET";
                        $l_login_imp = "Utenti :";
                        $l_password_imp = "Password :";
                        $l_session_timeout_imp="Durata della sessione :";
                        $l_max_daily_session_imp="Ore giornaliere :";
                        $l_max_monthly_session_imp ="Durata mensile :";
                        $l_expiration_imp="Data di scadenza :";
                        $v_illimit="Illimitato";
                break;          
                default:
                        $l_title_imp = "INTERNET VOUCHER";
                        $l_login_imp = "Login :";
                        $l_password_imp = "Password :";
                        $l_session_timeout_imp="Session timeout :";
                        $l_max_daily_session_imp="Max daily session :";
                        $l_max_monthly_session_imp ="Max monthly session :";
                        $l_expiration_imp="Expiration date :";
                        $v_illimit="Unlimited";
                break;
        }
}
?>