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 hashes)

Uploaded Source

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