I tried php gettext in my localhost and everything worked, but when I uploaded the files to my hosting it said the following:
Warning: putenv(): Safe Mode warning: Cannot set environment variable 'LC_ALL' - it's not in the allowed list in /www/zxq.net/w/e/e/weedcl/htdocs/localization.php on line 4 Fatal error: Call to undefined function bindtextdomain() in /www/zxq.net/w/e/e/weedcl/htdocs/localization.php on line 6
I'm using the free hosting service Zymic (Does it have to do with the fact that its FREE?).
My localization.php:
<?php
$locale = "de_DE";
if (isSet($_GET["locale"])) $locale = $_GET["locale"];
putenv("LC_ALL=$locale");
setlocale(LC_ALL, $locale);
bindtextdomain("messages", "./locale");
bind_textdomain_codeset("messages", 'UTF-8');
textdomain("messages");
?>