2017 © Pedro Peláez
 

library twig-inflection

Twig filters for inflection

image

davedevelopment/twig-inflection

Twig filters for inflection

  • Tuesday, February 19, 2013
  • by davedevelopment
  • Repository
  • 1 Watchers
  • 4 Stars
  • 13,021 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 2 Versions
  • 10 % Grown

The README.md

TwigInflection

pluralize

``` jinja, (*1)

{{ "chicken"|pluralize }}, (*2)

=> chickens, (*3)

{{ rows.length }} {{ "row"|pluralize(rows.length) }}, (*4)

=> 1 row => 2 rows, (*5)

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

=> 1 person => 2 users, (*7)


singularize ----------- The opposite of pluralize, working in the same manner ``` jinja {{ "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 :), (*8)

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

The Versions

19/02 2013

dev-master

9999999-dev http://github.com/davedevelopment/twig-inflection

Twig filters for inflection

  Sources   Download

MIT

The Requires

 

The Development Requires

twig inflector twig extension inflection pluralize pluralise

19/02 2013

1.0

1.0.0.0 http://github.com/davedevelopment/twig-inflection

Twig filters for inflection

  Sources   Download

MIT

The Requires

 

The Development Requires

twig inflector twig extension inflection pluralize pluralise