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.

Files for jinja2-pluralize-filter, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size jinja2-pluralize-filter-0.0.2.tar.gz (1.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page