Embryon de fonction de lecture des dialogues

This commit is contained in:
Fred Tempez 2022-09-02 15:36:05 +02:00
parent dc1c0b6fe0
commit 674d7c0a56
2 changed files with 10 additions and 0 deletions

View File

@ -19,6 +19,14 @@ class helper {
const FILTER_URL = 11;
/**
* Traduire le message dans la langue déterminée
*/
public static function translate($text) {
$r = (array_key_exists($text, core::$dialog)) ? core::$dialog[$text] : $text;
return ($r);
}
/**
* Récupérer l'adresse IP sans tenir compte du proxy

View File

@ -439,6 +439,8 @@ class template {
'help' => '',
'id' => ''
], $attributes);
$attributes['help'] = helper::translate($attributes['help']);
$item = $attributes['href'] ? '<a data-tippy-content="' . $attributes['help'] . '" href="' . $attributes['href'] . '" ' . $attributes['attr']. ' >' : '';
$item .= '<span id="' . $attributes['id']. '" class="zwiico-' . $ico . ($attributes['margin'] ? ' zwiico-margin-' . $attributes['margin'] : '') . ($attributes['animate'] ? ' animate-spin' : '') . '" style="font-size:' . $attributes['fontSize'] . '"><!----></span>';
$item .= ($attributes['href']) ? '</a>' : '';