PHPackages                             mesavolt/inflector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mesavolt/inflector

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mesavolt/inflector
==================

Easy-to-use French plural generator

v1.0.0(6y ago)09.3k↓27.6%MITPHPPHP &gt;=7.1

Since Sep 30Pushed 6y ago2 watchersCompare

[ Source](https://github.com/MesaVolt/inflector)[ Packagist](https://packagist.org/packages/mesavolt/inflector)[ RSS](/packages/mesavolt-inflector/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Named enum for PHP 7.1 +
========================

[](#named-enum-for-php-71-)

[![Latest Stable Version](https://camo.githubusercontent.com/7a0e94da85c34a822260fc1ae2084c40f624edb71a45237e6437b38a4712adce/68747470733a2f2f706f7365722e707567782e6f72672f6d657361766f6c742f696e666c6563746f722f762f737461626c65)](https://packagist.org/packages/mesavolt/inflector)[![Build Status](https://camo.githubusercontent.com/df357024b6bd75540e6b4b573b2325ccfa8ad88ba060594a07365c90171d36a6/68747470733a2f2f7472617669732d63692e6f72672f4d657361566f6c742f696e666c6563746f722e737667)](https://travis-ci.org/MesaVolt/inflector)[![Coverage Status](https://camo.githubusercontent.com/ca7fb8b5839b4c3312f6e96f5245428fe342d7838169541464ca3954a78db1ad/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4d657361566f6c742f696e666c6563746f722f62616467652e737667)](https://coveralls.io/github/MesaVolt/inflector)[![License](https://camo.githubusercontent.com/09caffcc0ec51ef9b7fd390e8ebedc4c853e5990bc384b44edb48acf353a3daa/68747470733a2f2f706f7365722e707567782e6f72672f6d657361766f6c742f696e666c6563746f722f6c6963656e7365)](https://packagist.org/packages/mesavolt/inflector)

Usage
-----

[](#usage)

Add the package to your project :

```
composer require mesavolt/inflector
```

```
// Use it with any number or countable value:
Inflector::plural('cheval', 2);     // Returns 'chevaux'
Inflector::plural('cheval', 1);     // Returns 'chevaux'
Inflector::plural('cheval', [$horse1, $horse2]); // Returns 'chevaux'

// Specify the plural form if you want:
Inflector::plural('cheval', 2, 'chevals');     // Returns 'chevals'
Inflector::plural('un petit cheval', 2, 'des petits chevaux'); // Returns 'des petits chevaux'
```

Integration
-----------

[](#integration)

### Symfony &gt;=3 with Twig &gt;1.26

[](#symfony-3-with-twig-126)

If you use the default [auto-configuring feature of Symfony introduced in Symfony 3.3](https://symfony.com/doc/current/service_container/3.3-di-changes.html), you only need to register the `MesaVolt\Twig\InflectorExtension` as a service in your `services.yml` file. Symfony will tag it properly to register it in the twig environment used by your app.

If you don't use the auto-configuring feature or if it's not available in your version, you need to apply the tags manually when you register the extension as a service.

```
# Symfony 3: app/config/services.yml
# Symfony 4: config/services.yaml
services:

    # Use this if you use the default auto-configuring feature of Symfony >=3.3  DI container
    MesaVolt\Twig\InflectorExtension: ~

    # Use this if you **don't** use the auto-configuring feature of Symfony >=3.3 DI container
    app.inflector_extension:
        class: MesaVolt\Twig\InflectorExtension
        tags: { name: twig.extension }
```

Then, you can use the `plural` filter provided by the extension in your templates :

```
{# templates/my-template.html.twig #}

Il y a {{ users|length }} {{ 'utilisateur'|plural(users) }} dans la base de données.
```

Testing
-------

[](#testing)

```
composer dump-autoload # make sure vendor/autoload.php exists
./vendor/bin/phpunit
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2422d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f6de0bb13479bfaa0d23d1002ad3195d45d2451150f6bd089bf07b9911c87d6?d=identicon)[mesavolt](/maintainers/mesavolt)

---

Top Contributors

[![quentin-st](https://avatars.githubusercontent.com/u/1551971?v=4)](https://github.com/quentin-st "quentin-st (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mesavolt-inflector/health.svg)

```
[![Health](https://phpackages.com/badges/mesavolt-inflector/health.svg)](https://phpackages.com/packages/mesavolt-inflector)
```

###  Alternatives

[vcian/pulse-active-sessions

A Laravel Pulse card to show active user session.

11469.2k](/packages/vcian-pulse-active-sessions)[norberttech/aceeditor-bundle

Bundle that integrate excellent JavaScript ace editor into Symfony Form.

28310.8k](/packages/norberttech-aceeditor-bundle)[tomloprod/radiance

A deterministic mesh gradient avatar generator for PHP.

1393.7k](/packages/tomloprod-radiance)[chefkoch/morphoji

A library to convert UTF-8 emoji characters to latin1 placeholders and vice versa.

14136.9k1](/packages/chefkoch-morphoji)[epessine/axis

Draw charts with a simple API on Laravel

265.6k](/packages/epessine-axis)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
