There's a new function, lazy_gettext, added to the i18n package. This
is used when you need to "mark" a string for translation in advance
before you know what the user locale will be. For example, for
localizing FormEncode error messages or widget values.

Here's an example:

from turbogears.i18n import lazy_gettext
from turbogears import validators

v = validators.MinLength(minLength=3,
messages={"tooShort":lazy_gettext("You must include at least
%(minLength)i characters")})

Reply via email to