Skip to content

Commit

Permalink
un fichier de langue locale eventuel n'était plus pris en compte
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickpollet committed Nov 17, 2014
1 parent 82bb7bd commit 1f85344
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
11 changes: 6 additions & 5 deletions codes/locale/fr_utf8.php
@@ -1,23 +1,24 @@
<?php
/**
* @author Patrick Pollet
* @version $Id: fr.php 822 2009-05-28 16:04:32Z ppollet $
* @version $Id: fr.php 822 2014-11-17 16:04:32Z ppollet $
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package c2ipf
*/

/**
* exemple de personnalisation de la traduction
* exemples de personnalisation de la traduction
*
*/


$textes_langues["bouton_tester"]="tester/ retester ...";
//$textes_langues["bouton_tester"]="tester/ retester ...";

$textes_langues["texte_bienvenue"] =
/*
$textes_langues["texte_bienvenue"] =
"<div class='information'>Bienvenue sur la plate-forme de certification et positionnement pour le C2i® niveau 1 <br/>".
"hebergée au Centre Informatique du Premier Cycle de l'INSA de Lyon</div>";

*/



Expand Down
7 changes: 7 additions & 0 deletions commun/c2i_params.php
Expand Up @@ -222,6 +222,13 @@ function addslashes_deep($value) {
if (file_exists($file))
require_once($file);

// lecture d'un fichier de langue locale si il existe
if ($CFG->universite_serveur ==1 &&(is_file($chemin."/codes/nationale/".$fichier_langue))) {
@include_once ($chemin."/codes/nationale/".$fichier_langue);
}
elseif (is_file($chemin."/codes/locale/".$fichier_langue)) {
@include_once ($chemin."/codes/locale/".$fichier_langue);
}

require_once ($chemin_commun."/lib_auth.php");
require_once ($chemin_commun."/lib_fichiers.php");
Expand Down
6 changes: 5 additions & 1 deletion commun/lib_langues.php
Expand Up @@ -24,7 +24,7 @@
*********************************************************************************/
//fichier commun a toutes les plate-formes
if (!isset($fichier_langue_defaut))
$fichier_langue_defaut="fr.php";
$fichier_langue_defaut="fr_utf8.php";

// rev 978 fichier sp�cifique � la pf c2in1, c2i2mead ...
if (!isset($fichier_langue_plateforme))
Expand Down Expand Up @@ -59,12 +59,16 @@

// on ne peut pas encore tester si la pf est locale ou non (config non lue)
// d'ou ce test...
/************************
* CODE DEPLACE DANS c2i_params après lecture de CFG
* car en V2 il y a toujours un fichier codes/nationale/fr_utf8.php !!!
if (is_file($chemin."/codes/nationale/".$fichier_langue)) {
@include_once ($chemin."/codes/nationale/".$fichier_langue);
}
elseif (is_file($chemin."/codes/locale/".$fichier_langue)) {
@include_once ($chemin."/codes/locale/".$fichier_langue);
}
************************/

function ucFirstConditionnel ($chaine, $ouiNon) {
return ($ouiNon ? ucfirst($chaine):$chaine);
Expand Down

0 comments on commit 1f85344

Please sign in to comment.