The translated string is repeated back when I use Apache and the following example on Mac OS X. However, I receive the original text "Inactive account" on Ubuntu with lighttpd. Without success, I've tried a tonne of different environment variant combinations. I can echo out the contents of the.mo file, so it's also not a problem with file permissions.
<?php
//$locale = 'sv_SE.UTF-8';
$locale = 'sv_SE';
$dir = dirname(__FILE__);
// File permission is apparantly not a problem as this works...
//echo file_get_contents($dir . '/sv_SE/LC_MESSAGES/flattr.mo');
putenv("LANG=$locale");
putenv("LANGUAGE=$locale");
putenv("LC_ALL=$locale");
putenv("LC_MESSAGES=$locale");
setlocale(LC_ALL, $locale);
setlocale(LC_MESSAGES, $locale);
//setlocale(LANG, $locale);
//setlocale(LANGUAGE, $locale);
bindtextdomain('flattr', $dir);
//bind_textdomain_codeset("flattr", 'UTF-8');
textdomain('flattr');
echo _("Inactive account");
?>
Can someone help me with this?