diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-01-11 06:33:28 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-01-11 06:33:28 (GMT) |
commit | 1be641987145f88d61e52d5b4714a8cc6c7e6da8 (patch) | |
tree | 7a06c20958da4b357e9a4d8f0cc8e4e3944c8f52 /Doc/lib | |
parent | 57f61fb80bbee08af3a24594c0cae56c855968f7 (diff) | |
download | cpython-1be641987145f88d61e52d5b4714a8cc6c7e6da8.zip cpython-1be641987145f88d61e52d5b4714a8cc6c7e6da8.tar.gz cpython-1be641987145f88d61e52d5b4714a8cc6c7e6da8.tar.bz2 |
Add fallback argument to translation(). Request fallbacks on install.
Fixes #500595.
Diffstat (limited to 'Doc/lib')
-rw-r--r-- | Doc/lib/libgettext.tex | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/lib/libgettext.tex b/Doc/lib/libgettext.tex index aaacd80..be22340 100644 --- a/Doc/lib/libgettext.tex +++ b/Doc/lib/libgettext.tex @@ -123,7 +123,8 @@ If no such file is found, then \code{None} is returned. \end{funcdesc} \begin{funcdesc}{translation}{domain\optional{, localedir\optional{, - languages\optional{, class_}}}} + languages\optional{, + class_,\optional{fallback}}}}} Return a \class{Translations} instance based on the \var{domain}, \var{localedir}, and \var{languages}, which are first passed to \function{find()} to get the @@ -132,7 +133,9 @@ identical \file{.mo} file names are cached. The actual class instantiated is either \var{class_} if provided, otherwise \class{GNUTranslations}. The class's constructor must take a single file object argument. If no \file{.mo} file is found, this -function raises \exception{IOError}. +function raises \exception{IOError} if \var{fallback} is false +(which is the default), and returns a \class{NullTranslations} instance +if \var{fallback} is true. \end{funcdesc} \begin{funcdesc}{install}{domain\optional{, localedir\optional{, unicode}}} |