Skip to content

Instantly share code, notes, and snippets.

View puentesdiaz's full-sized avatar

Roberto Germán Puentes Diaz puentesdiaz

View GitHub Profile
@coma
coma / AppKernel.php
Created March 20, 2013 16:06
Idea para solucionar el problema de los plurales en castellano para Symfony.
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
use Doctrine\Common\Inflector\Inflector;
class AppKernel extends Kernel
{
public function __construct($environment, $debug)
{
Inflector::rules('singular', [
'/(d|n|r|s)es$/i' => '\1\2',