On this page
  1. gettext.npgettext
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

gettext.npgettext

Prev: gettext.ngettext | Up: gettext | Next: gettext.NullTranslations
Rel: gettext.bindtextdomain, gettext.Catalog, gettext.dgettext, gettext.dngettext
Ref: docs.python.org — gettext.npgettext
Tags: #public #python3 #stdlib #gettext


Import

import gettext
from gettext import npgettext

Signature & Overview

gettext.npgettext(context, msgid1, msgid2, n)

gettext.npgettext() function.

Usage

import gettext

assert gettext.npgettext("tab", "1 tab", "%d tabs", 2) == "%d tabs"

Gotchas

REPL Inspect

from gettext import npgettext
help(npgettext)

Linked from

Related notes