I am using the php-gettext library. Following the tutorial here, I have set up the _gettext() function
require_once("locale/gettext.php");
require_once("locale/streams.php");
$locale_file = new FileReader("locale/$locale/LC_MESSAGES/messages.mo");
$locale_fetch = new gettext_reader($locale_file);
function _gettext($text){
global $locale_fetch;
return $locale_fetch->translate($text);
}
I also want to use the ngettext() function to translate plural texts. Now it does not work. How can I do that? Thanks!