Fermer la captation

This commit is contained in:
Fred Tempez 2022-09-06 20:34:35 +02:00
parent 8ba635624e
commit 0eac2b11c9

View File

@ -26,6 +26,7 @@ class helper {
public static function translate($text) { public static function translate($text) {
// Captation // Captation
/*
$data = json_decode(file_get_contents('site/i18n/template.json'), true); $data = json_decode(file_get_contents('site/i18n/template.json'), true);
if (!array_key_exists($text, $data) ) { if (!array_key_exists($text, $data) ) {
if ($text !== '' ) { if ($text !== '' ) {
@ -33,6 +34,7 @@ class helper {
file_put_contents ('site/i18n/template.json', json_encode($data, JSON_UNESCAPED_UNICODE), LOCK_EX); file_put_contents ('site/i18n/template.json', json_encode($data, JSON_UNESCAPED_UNICODE), LOCK_EX);
} }
} }
*/
$r = (array_key_exists($text, core::$dialog)) ? core::$dialog[$text] : $text; $r = (array_key_exists($text, core::$dialog)) ? core::$dialog[$text] : $text;
return ($r); return ($r);
} }