translation - How to make ngettext() works using the php-gettext library? -
i using php-gettext library. following tutorial here, have set _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 want use ngettext() function translate plural texts. not work. how can that? thanks!
ok found it
function _ngettext($t1, $t2, $count){ global $locale_fetch; return $locale_fetch->ngettext($t1, $t2, $count); }
Comments
Post a Comment