diff --git a/gamuform_fonctions.php b/gamuform_fonctions.php index 165cb38..a7902ae 100644 --- a/gamuform_fonctions.php +++ b/gamuform_fonctions.php @@ -13,6 +13,15 @@ if (!defined('_ECRIRE_INC_VERSION')) { return; } + +function gamuform_lang(?string $chaine):string { + if (strpos($chaine, ':>') !== false) { + $chaine = substr($chaine, 2, -2); + $chaine = _T($chaine); + } + return $chaine ?? ''; +} + /** * filtre generale qui appelle un filtre spécifique, déclaré dans l'array saisies avec la cle : gamutable/filtre * si cette fonction commence par _array_ ex: _array_maSuperFonction => elle aura en parametre l'array de la ligne diff --git a/json_gamuform.json.html b/json_gamuform.json.html index 976f058..880167b 100644 --- a/json_gamuform.json.html +++ b/json_gamuform.json.html @@ -12,7 +12,7 @@ "id": "id", "edit": "", -[(#CLE|json_encode)] : [(#VALEUR|json_encode)], +[(#CLE|json_encode)] : [(#VALEUR*|gamuform_lang|json_encode)], "sup": "" },