问题
I'm looking for a good inflection (or well, a library that can turn plural into singular and vice verse - which a kind of inflection) library for PHP, it could be a part of some current framework or a stand alone library the only requirement I have is that it's compatible with the MIT license.
回答1:
There is one included with Code Igniter, you could check it out and see if it meets your needs.
回答2:
You'll find a good example on the one that comes with CakePHP:
Cake/Utility/Inflector.php
It's part of a framework and it's MIT licensed.
回答3:
I'm using this one Improved Pluralizing in php actionscript and ROR. It's released with an MIT license and isn't part of a framework.
回答4:
http://solarphp.com/class/Solar_Inflect
来源:https://stackoverflow.com/questions/170033/good-inflection-library-for-php