Internationalization¶
- trytond.i18n.gettext(message_id[, language[, \**variables]])¶
Return the message translated into the
language.The
message_idis theXMLid for the Message <model-ir.message> that is to be translated, and thevariableskeyword arguments are used as a mapping to format the string. Iflanguageis not set, then theTransaction.languageis used.
- trytond.i18n.lazy_gettext(message_id[, language[, \**variables]])¶
Return a LazyString that will be translated with
gettext()later when actually used.
- trytond.i18n.ngettext(message_id, n[, language[, \**variables]])¶
Like
gettext()but for plural message which depend onnthe number of count.
- trytond.i18n.lazy_ngettext(message_id, n[, language[, \**variables]])¶
Return a LazyString that will be translated with
ngettext()later when actually used.