From 2ee436eaa19fd5819a0e6c705b5fcc93f11fb338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 2 Aug 2013 10:39:03 +0200 Subject: poche / pocket / bolsillo / Tasche & more --- inc/MyTool.class.php | 2 +- inc/config.php | 7 +++++++ inc/functions.php | 12 ++++++------ 3 files changed, 14 insertions(+), 7 deletions(-) (limited to 'inc') diff --git a/inc/MyTool.class.php b/inc/MyTool.class.php index 1f5051a4..b11f18e9 100644 --- a/inc/MyTool.class.php +++ b/inc/MyTool.class.php @@ -15,7 +15,7 @@ class MyTool define('START_TIME', microtime(true)); if (phpversion() < 5) { - die("Argh you don't have PHP 5 !"); + die(_('Oops, it seems you don\'t have PHP 5.')); } error_reporting(E_ALL); diff --git a/inc/config.php b/inc/config.php index 4b46366d..6e3f80b8 100644 --- a/inc/config.php +++ b/inc/config.php @@ -20,6 +20,13 @@ define ('CONVERT_LINKS_FOOTNOTES', TRUE); define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE); define ('DOWNLOAD_PICTURES', TRUE); define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX'); +define ('LANG', 'fr_FR.UTF8'); + +putenv("LC_ALL=".LANG); +setlocale(LC_ALL, LANG); +bindtextdomain(LANG, "./locale"); +textdomain(LANG); + $storage_type = 'sqlite'; # sqlite or file include 'functions.php'; diff --git a/inc/functions.php b/inc/functions.php index 73e591c5..34ecf510 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -349,19 +349,19 @@ function action_to_do($action, $url, $id = 0) if (DOWNLOAD_PICTURES) { $content = filtre_picture($parametres_url['content'], $url, $last_id); } - $msg->add('s', 'the link has been added successfully'); + $msg->add('s', _('the link has been added successfully')); } else { - $msg->add('e', 'error during insertion : the link wasn\'t added'); + $msg->add('e', _('error during insertion : the link wasn\'t added')); } } else { - $msg->add('e', 'error during url preparation : the link wasn\'t added'); + $msg->add('e', _('error during url preparation : the link wasn\'t added')); logm('error during url preparation'); } } else { - $msg->add('e', 'error during url preparation : the link is not valid'); + $msg->add('e', _('error during url preparation : the link is not valid')); logm($url . ' is not a valid url'); } @@ -370,11 +370,11 @@ function action_to_do($action, $url, $id = 0) case 'delete': if ($store->deleteById($id)) { remove_directory(ABS_PATH . $id); - $msg->add('s', 'the link has been deleted successfully'); + $msg->add('s', _('the link has been deleted successfully')); logm('delete link #' . $id); } else { - $msg->add('e', 'the link wasn\'t deleted'); + $msg->add('e', _('the link wasn\'t deleted')); logm('error : can\'t delete link #' . $id); } break; -- cgit v1.2.3