Skip to main content

Simple jinja2 filter to choose correct plural form for Russian language.

Project description

Simple jinja2 filter to choose correct plural form for Russian language.

Installation

pip install jinja2-pluralize-filter

You need to register filter on the template environment:

from pluralize import pluralize environment.filters[‘pluralize’] = pluralize

or in Flask:

from flask import current_app from pluralize import pluralize

app.template_filter(‘pluralize’)(pluralize)

Example of usage:

{{ results_count|pluralize([‘товар’, ‘товара’, ‘товаров’]) }}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jinja2-pluralize-filter-0.0.2.tar.gz (1.8 kB view details)

Uploaded Source

File details

Details for the file jinja2-pluralize-filter-0.0.2.tar.gz.

File metadata

File hashes

Hashes for jinja2-pluralize-filter-0.0.2.tar.gz
Algorithm Hash digest
SHA256 67dd1dc64dbe00c071bbc3b13351fd97ed194ea54492d874ae4c85abf0d37a1a
MD5 94c8499e112dd96a438007d9f49cc5fb
BLAKE2b-256 c2e63c25b96fb5f38886071425274a1ba73cd2326487fbd9569ca3720abfb9b9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page