module de traduction

This commit is contained in:
Fred Tempez 2023-08-05 17:27:09 +02:00
parent be6ee35584
commit 1c0daf9828

View File

@ -2,7 +2,7 @@
$langSource = 'fr_FR'; $langSource = 'fr_FR';
$langTarget = 'el'; $langTarget = 'de';
$folderTargetArray = [ $folderTargetArray = [
'../', '../',
/* /*
@ -16,7 +16,7 @@ $folderTargetArray = [
]; ];
foreach ($folderTargetArray as $keyFolder => $folderTarget) { foreach ($folderTargetArray as $keyFolder => $folderTarget) {
if (file_exists($folderTarget . $langSource . '.json')) { if (file_exists($folderTarget . $langSource . '.json')) {
$sourceData = json_decode(file_get_contents($folderTarget . $langSource . '-2.json'), true); $sourceData = json_decode(file_get_contents($folderTarget . $langSource . '.json'), true);
foreach ($sourceData as $originText => $targetText) { foreach ($sourceData as $originText => $targetText) {
if (empty($targetText)) { if (empty($targetText)) {
echo '<p>'; echo '<p>';