From ed15b416a954a2e28539440a3fc2e55da4094bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Sun, 3 Jan 2021 14:17:40 +0100 Subject: [PATCH] Translation on php finished --- .../content/{apropos.md => about.md} | 0 hosts/localhost/content/usage.md | 1 + index.php | 26 ++--- js/functions.js | 2 +- js/functionsadmin.js | 2 +- lang/en.json | 15 ++- lang/fr.json | 17 +++- lib/functions.php | 96 ++++++++----------- 8 files changed, 79 insertions(+), 80 deletions(-) rename hosts/localhost/content/{apropos.md => about.md} (100%) diff --git a/hosts/localhost/content/apropos.md b/hosts/localhost/content/about.md similarity index 100% rename from hosts/localhost/content/apropos.md rename to hosts/localhost/content/about.md diff --git a/hosts/localhost/content/usage.md b/hosts/localhost/content/usage.md index 3e1641b..419444e 100644 --- a/hosts/localhost/content/usage.md +++ b/hosts/localhost/content/usage.md @@ -43,6 +43,7 @@ define('LOG_FILE', 'log.txt'); define('ACCESS_IP', ''); define('HISTORY_FILE', 'history.txt'); define('MAX_HISTORY_FILES', 5); +define('LANG', 'en'); ``` **NOTE**: diff --git a/index.php b/index.php index b064527..1d05ba6 100644 --- a/index.php +++ b/index.php @@ -102,7 +102,7 @@ else if (isset($_POST['action'])) case 'search': $results=searchstr(CONTENT_DIR,$_POST['search']); //print_r($results); - $content="

Résultats de recherche

Il y a ".$results['totalFiles']." occurence(s) trouvée(s):

"; + $content=sprintf($LANG['FOUND'],$results['totalFiles']); foreach($results['files'] as $key => $value) $content.='

'.$key.'

'.$value.'

'; if ($_POST['type']=="js") @@ -155,7 +155,7 @@ else @@ -204,7 +204,7 @@ print(($_SESSION['md_admin'] == true)?'