i18n and plurals
Ian Bicking <[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
There doesn't seem to be any way to handle plurals with ngettext. I'm
guessing it should be via something like an optional argument to
message(), like:
def message(self, msgName, state, pluralize=None, **kw):
if pluralize:
n = kw[pluralize]
msg = ngettext(self._messages[msgName],
self._messages[msgName+'Plural'], n)
But obviously integrated with the rest of what goes on in that function.
--
Ian Bicking | [email protected] | http://blog.ianbicking.org
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV