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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for jinja2-pluralize-filter-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67dd1dc64dbe00c071bbc3b13351fd97ed194ea54492d874ae4c85abf0d37a1a |
|
MD5 | 94c8499e112dd96a438007d9f49cc5fb |
|
BLAKE2b-256 | c2e63c25b96fb5f38886071425274a1ba73cd2326487fbd9569ca3720abfb9b9 |