Created
March 20, 2013 16:06
-
-
Save coma/5205920 to your computer and use it in GitHub Desktop.
Idea para solucionar el problema de los plurales en castellano para Symfony.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | |
'/(sis)$/i' => '\1\2', | |
'/([ti])a$/i' => '\1a', | |
]); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment