No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/DaveDevelopment/TwigInflection/Twig/Extension
tests
.gitignore
LICENCE
README.md
composer.json
phpunit.xml.dist

README.md

TwigInflection

pluralize

{{ "chicken"|pluralize }}

=> chickens

{{ rows.length }} {{ "row"|pluralize(rows.length) }}

=> 1 row
=> 2 rows

{{ users.length }} {{ "person"|pluralize(users.length, "users") }}

=> 1 person
=> 2 users

singularize

The opposite of pluralize, working in the same manner

{{ "chickens"|singularize }}

=> chicken

Contributing

Get in touch before hacking on anything, I've no idea what I might be doing, the whole library may have changed since my last push :)

Copyright

Copyright (c) 2013 Dave Marshall. See LICENCE for further details