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.

Filename, size & hash SHA256 hash help File type Python version Upload date
jinja2-pluralize-filter-0.0.2.tar.gz (1.8 kB) Copy SHA256 hash SHA256 Source None Jul 26, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page