Added fr_FR.utf8 language code support and defined it as default

This commit is contained in:
Rooty 2021-06-08 19:07:48 +02:00
parent 10c67f312a
commit 6feda01356
6 changed files with 30 additions and 27 deletions

2
.gitignore vendored
View File

@ -101,6 +101,7 @@ data/image/icons/language/
!data/image/icons/language/fo.png
!data/image/icons/language/fr_gb.png
!data/image/icons/language/fr.png
!data/image/icons/language/fr_FR.utf8.png
!data/image/icons/language/ga.png
!data/image/icons/language/gb_fr.png
!data/image/icons/language/gb.png
@ -1440,6 +1441,7 @@ install/
!install/check_lang.php
!install/do_install.php
!install/fr_readme_install.txt
!install/fr-FR.utf8_readme_install.txt
!install/gb_readme_install.txt
!install/index.php
!install/lib_install.php

View File

@ -70,7 +70,7 @@ $GLOBALS['SYSTEM_DEFAULT_USER_ADMIN']=2; /* compte par défaut d'administration
$GLOBALS['SYSTEM_DEFAULT_USER_GUEST']=1; /* utilisateur anonyme par défaut (1 seul) */
/* Langue par defaut utilisée */
$GLOBALS['SYSTEM_DEFAULT_LANGUAGE']=1; /* identifiant de la langue par défaut */
$GLOBALS['SYSTEM_DEFAULT_LANGUAGE_CODE']="fr"; /* identifiant de la langue par défaut */
$GLOBALS['SYSTEM_DEFAULT_LANGUAGE_CODE']="fr_FR.utf8"; /* identifiant de la langue par défaut */
$GLOBALS['SYSTEM_DEFAULT_NODE']=1; /* utilisateur anonyme par défaut (1 seul) */
/* clé system de cryptage */

View File

@ -45,7 +45,8 @@ function check_lang($filetest="")
'de' => 'de([_-][a-z]+)?',
'gb' => 'en([_-][a-z]+)?',
'et' => 'et',
'fi' => 'fi',
'fi' => 'fi',
'fr_FR.utf8' => 'fr_FR.utf8',
'fr' => 'fr([_-][a-z]+)?',
'el' => 'el',
'es-ar' => 'es[_-]ar',
@ -98,9 +99,9 @@ function check_lang($filetest="")
{
if (preg_match('#' . $match . '#i', trim($accept_lang_array[$i])))
{
if (file_exists(($QWARE_ROOT_PATH . 'data/message/' . strtolower($lang)."/".$filetest)))
if (file_exists(($QWARE_ROOT_PATH . 'data/message/' . $lang."/".$filetest)))
{
return strtolower($lang)."/";
return $lang."/";
}
}
}

View File

@ -94,22 +94,22 @@ INSERT INTO `{_PREFIX_}package_user_space` VALUES (1, 1, 0, 2147483647);
#--
#-- Contenu de la table `coordination_object`
#--
INSERT INTO `{_PREFIX_}coordination_object` VALUES (1, '0000-00-00 00:00:00', 2, 3, 'defaultobject.png', 'AdminObject', '<?xml version="1.0" encoding="UTF-8" ?>\n\r\n\r<XML XLANGUECHAINEVERSION="1.0">\r\n <FR>c. Gérer les outils</FR>\r\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a333a7b733a31323a22746162466f7262696464656e223b613a303a7b7d733a373a2267726f75704964223b733a313a2231223b733a363a226e6f64654964223b733a313a2231223b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (3, '0000-00-00 00:00:00', 2, 100, 'defaultobject.png', 'Home', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <FR>Accueil</FR>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a303a7b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (4, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'AdminNode', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <FR>b. Gérer les espaces</FR>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a333a7b733a373a2267726f75704964223b693a313b733a363a226e6f64654964223b733a313a2231223b733a383a2274656d706c617465223b613a313a7b693a303b733a373a2264656661756c74223b7d7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (5, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'AddCom', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <FR>a. Créer une communauté</FR>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a303a7b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (6, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'AdminGroup', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <FR>d. Gérer les groupes</FR>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a313a7b733a373a2267726f75704964223b733a313a2231223b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (7, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'AdminEntryNode', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <FR>e. Gérer les accès</FR>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a323a7b733a373a2267726f75704964223b733a313a2231223b733a363a226e6f64654964223b733a313a2231223b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (8, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'AdminUser', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <FR>f. Gérer les comptes</FR>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a313a7b733a373a2267726f75704964223b733a313a2231223b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (35, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'InstallManager', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <FR>g. Gérer les mises à jour</FR>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a333a7b733a333a22667470223b733a31373a226d616a2e6772616e69776172652e6e6574223b733a353a226c6f67696e223b733a363a22737461626c65223b733a363a22706173737764223b733a363a22737461626c65223b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (2, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'Community', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <FR>Les communautés</FR>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a303a7b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (1, '0000-00-00 00:00:00', 2, 3, 'defaultobject.png', 'AdminObject', '<?xml version="1.0" encoding="UTF-8" ?>\n\r\n\r<XML XLANGUECHAINEVERSION="1.0">\r\n <fr_FR.utf8>c. Gérer les outils</fr_FR.utf8>\r\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a333a7b733a31323a22746162466f7262696464656e223b613a303a7b7d733a373a2267726f75704964223b733a313a2231223b733a363a226e6f64654964223b733a313a2231223b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (3, '0000-00-00 00:00:00', 2, 100, 'defaultobject.png', 'Home', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <fr_FR.utf8>Accueil</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a303a7b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (4, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'AdminNode', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <fr_FR.utf8>b. Gérer les espaces</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a333a7b733a373a2267726f75704964223b693a313b733a363a226e6f64654964223b733a313a2231223b733a383a2274656d706c617465223b613a313a7b693a303b733a373a2264656661756c74223b7d7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (5, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'AddCom', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <fr_FR.utf8>a. Créer une communauté</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a303a7b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (6, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'AdminGroup', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <fr_FR.utf8>d. Gérer les groupes</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a313a7b733a373a2267726f75704964223b733a313a2231223b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (7, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'AdminEntryNode', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <fr_FR.utf8>e. Gérer les accès</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a323a7b733a373a2267726f75704964223b733a313a2231223b733a363a226e6f64654964223b733a313a2231223b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (8, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'AdminUser', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <fr_FR.utf8>f. Gérer les comptes</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a313a7b733a373a2267726f75704964223b733a313a2231223b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (35, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'InstallManager', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <fr_FR.utf8>g. Gérer les mises à jour</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a333a7b733a333a22667470223b733a31373a226d616a2e6772616e69776172652e6e6574223b733a353a226c6f67696e223b733a363a22737461626c65223b733a363a22706173737764223b733a363a22737461626c65223b7d);
INSERT INTO `{_PREFIX_}coordination_object` VALUES (2, '0000-00-00 00:00:00', 2, 99, 'defaultobject.png', 'Community', '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n <fr_FR.utf8>Les communautés</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0x613a303a7b7d);
#-----------------------------------------------------------
#--
#-- Contenu de la table `group`
#--
INSERT INTO `{_PREFIX_}group` VALUES (1, 0, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<FR>Tous les utilisateurs</FR>\r\n</XML>\r\n\r\n</xml>', '');
INSERT INTO `{_PREFIX_}group` VALUES (2, 1, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<FR>Anonyme</FR>\r\n</XML>\r\n\r\n</xml>', '');
INSERT INTO `{_PREFIX_}group` VALUES (3, 1, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<FR>Administrateur</FR>\r\n</XML>\r\n\r\n</xml>', 'defaultnode.png');
INSERT INTO `{_PREFIX_}group` VALUES (1, 0, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<fr_FR.utf8>Tous les utilisateurs</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', '');
INSERT INTO `{_PREFIX_}group` VALUES (2, 1, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<fr_FR.utf8>Anonyme</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', '');
INSERT INTO `{_PREFIX_}group` VALUES (3, 1, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<fr_FR.utf8>Administrateur</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', 'defaultnode.png');
#-----------------------------------------------------------
#--
#-- Contenu de la table `group_user`
@ -120,16 +120,16 @@ INSERT INTO `{_PREFIX_}group_user` VALUES (2, 2, 3);
#--
#-- Contenu de la table `langue`
#--
INSERT INTO `{_PREFIX_}langue` VALUES (1, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<FR>Français</FR>\r\n</XML>\r\n\r\n</xml>', 'fr', 1);
INSERT INTO `{_PREFIX_}langue` VALUES (1, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<fr_FR.utf8>Français</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', 'fr', 1);
#-----------------------------------------------------------
#--
#-- Contenu de la table `node`
#--
INSERT INTO `{_PREFIX_}node` VALUES (1, 0, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<FR>Racine</FR>\r\n</XML>\r\n\r\n</xml>', 'orange08.png', 'lcube6', 'www.qware.fr', 'off', 'default', '', 0, 0, 0, '');
INSERT INTO `{_PREFIX_}node` VALUES (2, 1, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<FR>Anonyme</FR>\r\n</XML>\r\n\r\n</xml>', 'blockdevice.png', 'lcube6', 'www.qware.fr', 'off', 'default', '', 0, 0, 0, '');
INSERT INTO `{_PREFIX_}node` VALUES (3, 1, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<FR>Administration</FR>\r\n</XML>\r\n\r\n</xml>', 'orange15.png', 'lcube6', 'www.qware.fr', 'off', 'default', '', 0, 0, 0, '');
INSERT INTO `{_PREFIX_}node` VALUES (99, 3, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<FR>Configuration</FR>\r\n</XML>\r\n\r\n</xml>', 'defaultnode.png', 'lcube6', 'www.qware.fr', 'off', 'default', '', 0, 0, 0, '');
INSERT INTO `{_PREFIX_}node` VALUES (100, 3, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<FR>Site public</FR>\r\n</XML>\r\n\r\n</xml>', 'defaultnode.png', 'lcube6', 'www.qware.fr', 'off', 'default', '', 0, 0, 0, '');
INSERT INTO `{_PREFIX_}node` VALUES (1, 0, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<fr_FR.utf8>Racine</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', 'orange08.png', 'lcube6', 'www.qware.fr', 'off', 'default', '', 0, 0, 0, '');
INSERT INTO `{_PREFIX_}node` VALUES (2, 1, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<fr_FR.utf8>Anonyme</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', 'blockdevice.png', 'lcube6', 'www.qware.fr', 'off', 'default', '', 0, 0, 0, '');
INSERT INTO `{_PREFIX_}node` VALUES (3, 1, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<fr_FR.utf8>Administration</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', 'orange15.png', 'lcube6', 'www.qware.fr', 'off', 'default', '', 0, 0, 0, '');
INSERT INTO `{_PREFIX_}node` VALUES (99, 3, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<fr_FR.utf8>Configuration</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', 'defaultnode.png', 'lcube6', 'www.qware.fr', 'off', 'default', '', 0, 0, 0, '');
INSERT INTO `{_PREFIX_}node` VALUES (100, 3, '<?xml version="1.0" encoding="UTF-8" ?>\r\n\r\n<XML XLANGUECHAINEVERSION="1.0">\r\n<fr_FR.utf8>Site public</fr_FR.utf8>\r\n</XML>\r\n\r\n</xml>', 'defaultnode.png', 'lcube6', 'www.qware.fr', 'off', 'default', '', 0, 0, 0, '');
#-----------------------------------------------------------
#--
#-- Contenu de la table `node_group_user`

View File

@ -195,9 +195,9 @@ var $tabForbidden=array("adminentrynode", "admingroup", "adminnode", "home", "ad
for ($i=0; $i<count($tab);$i++)
{
/* récupération de l'image de la langue courante */
if (file_exists($GLOBALS['CONF_DATA_PATH']."data/image/icons/language/".strtolower($tab[$i]->getCode()).".png"))
if (file_exists($GLOBALS['CONF_DATA_PATH']."data/image/icons/language/".$tab[$i]->getCode().".png"))
{
$img=$GLOBALS['CONF_DATA_PATH']."data/image/icons/language/".strtolower($tab[$i]->getCode()).".png";
$img=$GLOBALS['CONF_DATA_PATH']."data/image/icons/language/".$tab[$i]->getCode().".png";
}else{
$img=$GLOBALS['CONF_DATA_PATH']."data/image/icons/language/default.png";
}

View File

@ -134,8 +134,8 @@ var $tab = null;
*/
function getLanguage($langue)
{
if(isset($this->tab[strtoupper($langue)])){
return $this->tab[strtoupper($langue)];
if(isset($this->tab[$langue])){
return $this->tab[$langue];
}else{
return "";
}
@ -151,7 +151,7 @@ var $tab = null;
*/
function setLanguage($langue,$value)
{
$this->tab[strtoupper($langue)]=$value;
$this->tab[$langue]=$value;
}
/**