PHPackages                             icanboogie/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. [Localization &amp; i18n](/categories/localization)
4. /
5. icanboogie/inflector

ActiveLibrary[Localization &amp; i18n](/categories/localization)

icanboogie/inflector
====================

Multilingual inflector that transforms words from singular to plural, underscore to camel case, and more.

v4.0.0(5mo ago)2182.5M↓56.6%2220BSD-3-ClausePHPPHP &gt;=7.4CI failing

Since Mar 14Pushed 5mo ago3 watchersCompare

[ Source](https://github.com/ICanBoogie/Inflector)[ Packagist](https://packagist.org/packages/icanboogie/inflector)[ Docs](https://icanboogie.org/)[ RSS](/packages/icanboogie-inflector/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (2)Versions (23)Used By (20)

Inflector
=========

[](#inflector)

[![Release](https://camo.githubusercontent.com/0a0f0d6a3a5db8be01645a8437c63bc14435155d9716cc0baf90270e157bd966/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6963616e626f6f6769652f696e666c6563746f722e737667)](https://packagist.org/packages/icanboogie/inflector)[![Code Coverage](https://camo.githubusercontent.com/ea8583d860791691356201ff4476d7342b0e5d2af4858b1e9341fd2b4760e3e5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4943616e426f6f6769652f496e666c6563746f722f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/r/ICanBoogie/Inflector?branch=main)[![Downloads](https://camo.githubusercontent.com/a9abf9c1c0a3a0e9d2618a2ab5858a2a4c2664095e44f228bb8efea38037c716/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6963616e626f6f6769652f696e666c6563746f722e737667)](https://packagist.org/packages/icanboogie/inflector)

A multilingual inflector that transforms words from singular to plural, underscore to camel case, and formats strings in various ways. Inflections are localized, the default English inflections for pluralization, singularization, and uncountable words are kept in [lib/Inflections/en.php](lib/Inflections/en.php).

Inflections are currently available for the following languages:

- English (`en`)
- French (`fr`)
- Norwegian Bokmal (`nb`)
- Portuguese (`pt`)
- Spanish (`es`)
- Turkish (`tr`)

#### Installation

[](#installation)

```
composer require icanboogie/inflector
```

Usage
-----

[](#usage)

These are some examples of the inflector with the `en` locale (default).

```
