Skip to content

riettotek/doctrine-Italian-inflector-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

doctrine-Italian-inflector-

italian language for the pluraliazer

Author: Mattias Raiani

This is a first step for the italian language for Inflector. I'll improve it in the future

SET UP

  1. In the Inflector's Doctrine vendor pack, there is a folder named Rules; Paste the Italian folder in such folder. Here is fully path:
vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules
  1. Add the const Italian in the Language.php file

Language

  1. Add the case line in the createForLanguage() method at the end of the InflectorFactory.php file; ...and don't forget to apply the use statement at the top of file to allow loading the language files

inflectorFactory

USAGE

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();

USAGE in LARAVEL

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'.

Pluralizer

About

lang italian for the pluraliazer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages