rum.i18n

rum.i18n.N_(value)

Mark a string for translation without translating it. Returns value.

Used for global strings, e.g.:

foo = N_('Hello')

class Bar:
    def __init__(self):
        self.local_foo = _(foo)

h.set_lang('fr')
assert Bar().local_foo == 'Bonjour'
h.set_lang('es')
assert Bar().local_foo == 'Hola'
assert foo == 'Hello'
class rum.i18n.RumTranslator(locales, search_order=None, fallback=True)

A translator that is able to load translation catalogs from pluggable eggs.

TODO: Document me and how to create aforementioned plugins

rum.i18n.ugettext(*args, **kwargs)

Lazy-evaluated version of the ugettext function

None

rum.i18n.ungettext(*args, **kwargs)

Lazy-evaluated version of the ungettext function

None

Previous topic

rum.component

Next topic

rum.basefactory

This Page