• Home
  • Raw
  • Download

Lines Matching refs:translation

30 translation of your entire application globally.  Often this is what you want if
69 Return the localized translation of *message*, based on the current global
81 Like :func:`.gettext`, but consider plural forms. If a translation is found,
83 languages have more than two plural forms). If no translation is found, return
106 but the translation is restricted to the given message *context*.
118 but the translation is returned as a byte string encoded in the preferred
184 .. function:: translation(domain, localedir=None, languages=None, class_=None, fallback=False, code…
198 translation object from the cache; the actual instance data is still shared with
216 :func:`translation`.
218 For the *names* parameter, please see the description of the translation
222 candidates for translation, by wrapping them in a call to the :func:`_`
238 Translation classes are what actually implement the translation of original
240 by all translation classes is :class:`NullTranslations`; this provides the basic
241 interface you can use to write your own specialized translation classes. Here
263 Add *fallback* as the fallback object for the current translation object.
264 A translation object should consult the fallback if it cannot provide a
265 translation for a given message.
300 Equivalent to :meth:`.gettext` and :meth:`.ngettext`, but the translation
356 t = gettext.translation('mymodule', ...)
374 :class:`GNUTranslations` parses optional metadata out of the translation
376 the translation for the empty string. This metadata is in :rfc:`822`\ -style
456 Equivalent to :meth:`.gettext` and :meth:`.ngettext`, but the translation
491 alias for the :func:`translation` function described above.
525 for translation, while the strings ``'mylog.txt'`` and ``'w'`` are not.
527 There are a few tools to extract the strings meant for translation.
561 :mod:`gettext` module for the actual translation processing at
577 translation :file:`.mo` files reside in :file:`/usr/share/locale` in GNU
582 t = gettext.translation('spam', '/usr/share/locale')
611 to create multiple translation instances and then switch between them
616 lang1 = gettext.translation('myapplication', languages=['en'])
617 lang2 = gettext.translation('myapplication', languages=['fr'])
618 lang3 = gettext.translation('myapplication', languages=['de'])
634 Occasionally however, you need to mark strings for translation, but defer actual
635 translation until later. A classic example is::