PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` babel.messages.plurals
Package babel :: Package messages :: Module plurals

Module plurals

Plural form definitions.
Functions
 
get_plural(locale='de_DE')
A tuple with the information catalogs need to perform proper pluralization.
Variables
  LC_CTYPE = 'de_DE'
  PLURALS = {'af': (2, '(n != 1)'), 'ar': (6, '(n==0 ? 0 : n==1 ...
  DEFAULT_PLURAL = (2, '(n != 1)')
  __package__ = 'babel.messages'
Function Details

get_plural(locale='de_DE')

 

A tuple with the information catalogs need to perform proper pluralization. The first item of the tuple is the number of plural forms, the second the plural expression.

>>> get_plural(locale='en')
(2, '(n != 1)')
>>> get_plural(locale='ga')
(3, '(n==1 ? 0 : n==2 ? 1 : 2)')

The object returned is a special tuple with additional members:

>>> tup = get_plural("ja")
>>> tup.num_plurals
1
>>> tup.plural_expr
'0'
>>> tup.plural_forms
'npurals=1; plural=0'

Converting the tuple into a string prints the plural forms for a gettext catalog:

>>> str(tup)
'npurals=1; plural=0'

Variables Details

PLURALS

Value:
{'af': (2, '(n != 1)'),
 'ar': (6,
        '(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n>=3 && n<=10 ? 3 : n>=11 &\
& n<=99 ? 4 : 5)'),
 'bg': (2, '(n != 1)'),
 'bn': (2, '(n != 1)'),
 'bo': (1, '0'),
 'ca': (2, '(n != 1)'),
...