Download the PHP package natanaelsimoes/twig-pluralize-extension without Composer
On this page you can find all versions of the php package natanaelsimoes/twig-pluralize-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download natanaelsimoes/twig-pluralize-extension
More information about natanaelsimoes/twig-pluralize-extension
Files in natanaelsimoes/twig-pluralize-extension
Package twig-pluralize-extension
Short Description Twig extension to output correctly pluralized strings
License MIT
Homepage https://github.com/natanaelsimoes/twig-pluralzie-extension/
Informations about the package twig-pluralize-extension
Twig Pluralize
A simple extension for Twig that allows you to pluralize a given string.
Usage
Register the function at services.yaml
if your're using Symfony:
then reference it in your template:
Given the values 0, 1, and 5, the above would output:
The last parameter (the "zero items" string) is optional. If omitted, the 3rd parameter (the "many items" string) will be used, as in the following:
The strings are passed through sprintf. You can use the %d token to insert the count into your string, if desired.
Contributing
If you have composer install, run composer install
but if you want to run it in a container, run docker-[so].sh
or docker-windows.bat
accordingly to your system.
License & Conduct
This project is licensed under the terms of the MIT License, included in LICENSE.md
.
All open source Tomodomo projects follow a strict code of conduct, included in CODEOFCONDUCT.md
. We ask that all contributors adhere to the standards and guidelines in that document.
Thank you!