On 07-01-2010 at 11:02:52 kaaposc <[email protected]> wrote:
2010/1/7 Kornel Lesiński <[email protected]>
if (false === strpos('${number}', $key))
{
$value = gettext($key);
}
else
{
$value = ngettext($key, $key, $this->_vars['number']);
}
The problem is, as you see, that gettext requires use of a different
function for plural form, and TAL syntax has no way to
indicate when this is needed. I'm open to suggestions.
Kornel, it won't work as first parameter should be "picture" and the
second should be "pictures" (or "${n} pictures" as in OP example).
AFAIK this is only for fallback in case translation is missing. Assuming
that translation file contains plural forms (using msgstr[] syntax), it'll
work just fine.
--
regards, Kornel
_______________________________________________
PHPTAL mailing list
[email protected]
http://lists.motion-twin.com/mailman/listinfo/phptal