Simple jinja2 filter to choose correct plural form for Russian language.
Project description
Simple jinja2 filter to choose correct plural form for Russian language.
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
File details
Details for the file jinja2-pluralize-filter-0.0.1.tar.gz
.
File metadata
- Download URL: jinja2-pluralize-filter-0.0.1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 165cb6a4934559203d2a0f97a2829605da653cbbd0b8b23b33197b7d3975b407 |
|
MD5 | 38faa7a1b8f525ccb25a857beb9a8875 |
|
BLAKE2b-256 | ecc44eef02e7473fdd85da83657281ca39efa1483397eab98f4c45f2fd23193d |