Everything work fine with poedit and the creation of.po files. The problem is my PHP file that is sending me a message error all the time:
Fatal error: Cannot redeclare _() in C:\xampp\htdocs\gettextdemo\demo.php on line 12
This is the code of the php file
<?php /* Date de création: 2014-03-16 */ ?>
<html>
<body>
<?php
require_once("lib/streams.php");
require_once("lib/gettext.php");
$locle_lang = $_GET['lang'];
$locale_file = new FileReader("locale/$locle_lang/LC_MESSAGES/messages.mo");
$locale_fetch = new gettext_reader($locale_file);
function _($text)
{
global $locale_fetch;
return $locale_fetch->translate($text);
}
?>
<h1><?php echo _("The best place in the world to get some text") ?> </h1> <p>
<?php echo _("the greatest son fo the bayou") ?> </p>
</body>
</html>
Sorry I can't figure out the mistake
Thank you