I had gettext working, but now it suddenly won't translate. I get find out whats going on. I am trying to use /sys/locale/no_NO/LC_MESSAGES/messages.po
to translate the page to norwegian.
/public/home.php
$locale = "en_US";
if (isSet($_COOKIE['lang'])) $locale = $_COOKIE['lang'];
putenv("LC_ALL=$locale");
setlocale(LC_ALL, $locale);
bindtextdomain("messages", "../sys/locale");
textdomain("messages");
echo "<p>locale: " . $locale . " ";
echo gettext("Home");
exit();
This prints out
locale: no_No Home
when I should be locale: no_No Hjem