Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit
https://github.com/akelos/akelos/issues
Akelos PHP Framework Forum
Discussions
Categories
General
: Pluralize models in spanish
Bottom of Page
1 to 3 of 3
CommentAuthor
Talizmelf
How can I tell the framework to pluralize models names in spanish when it's looking for the table in the DB..
thanks..
CommentAuthor
masylum
I think Akelos don't have a 'clean' way to do this. You can 'hack' Akelos a little bit this way:
Open lib/AkInflector.php
Find the pluralize method and add your spanish model names in the irregular array.
$irregular = array(
'person' => 'people',
'man' => 'men',
'child' => 'children',
'sex' => 'sexes',
'move' => 'moves',
'usuario' => 'usuarios',
'anacleto' => 'anacletos');
I hope it works for you! Luck!
CommentAuthor
Talizmelf
yes... I realized akelos does not have a clean way...
I did a better hack.. I changed the akelos Inflector class name and file name and turn the AkInflexor to AkInflector...
1 to 3 of 3
Back to Discussions
Top of Page