This is a first step for the italian language for Inflector. I'll improve it in the future
- In the Inflector's Doctrine vendor pack, there is a folder named
Rules
; Paste theItalian
folder in such folder. Here is fully path:
vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules
- Add the const Italian in the
Language.php
file
- Add the
case
line in the createForLanguage() method at the end of theInflectorFactory.php
file; ...and don't forget to apply the use statement at the top of file to allow loading the language files
By default it will create an English inflector. To use Italian language, just pass it to the createForLanguage() method:
use Doctrine\Inflector\InflectorFactory;
use Doctrine\Inflector\Language;
$inflector = InflectorFactory::createForLanguage(Language::ITALIAN)->build();
In the Pluraliazer.php file locate in the Illuminate\Support namespace.
In here, then u have to set the value of the $language property to italian
instead of 'english'.