4
4
[ ![ Code Coverage] ( https://coveralls.io/repos/github/ICanBoogie/Inflector/badge.svg?branch=main )] ( https://coveralls.io/r/ICanBoogie/Inflector?branch=main )
5
5
[ ![ Downloads] ( https://img.shields.io/packagist/dm/icanboogie/inflector.svg )] ( https://packagist.org/packages/icanboogie/inflector )
6
6
7
- A multilingual inflector that transforms words from singular to plural, underscore to camel case, and formats strings in
8
- various ways. Inflections are localized, the default English inflections for pluralization, singularization, and
9
- uncountable words are kept in [ lib/Inflections/en.php] ( lib/Inflections/en.php ) .
7
+ A multilingual inflector that transforms words from singular to plural, underscore to camel case,
8
+ and formats strings in various ways. Inflections are localized, the default English inflections for
9
+ pluralization, singularization, and uncountable words are kept in [ lib/Inflections/en.php] [ ] .
10
10
11
11
Inflections are currently available for the following languages:
12
12
@@ -142,9 +142,12 @@ echo pluralize('üçgen', 'tr'); // "üçgenler"
142
142
143
143
## About inflections
144
144
145
- Inflections are localized, the configurators are kept in [ lib/Inflections/en.php] ( lib/Inflections/en.php ) . Since v2.1,
146
- these configurators are auto-loaded classes, which means, in theory, you could add your own or overwrite those already
147
- defined by specifying another ` ICanBoogie\\Inflections\\ ` in your ` composer.json ` file.
145
+ Inflections are localized, the configurators are kept in [ lib/Inflections/] [ ] .
146
+
147
+ > [ !INFO]
148
+ > Since v2.1, these configurators are autoloaded classes, which means, in theory, you could add your
149
+ > own or overwrite those already defined by specifying another ` ICanBoogie\\Inflections\\ ` in your
150
+ > ` composer.json ` file.
148
151
149
152
150
153
@@ -156,21 +159,21 @@ Most of the code and documentation was adapted from [Ruby On Rails](http://rubyo
156
159
157
160
Significant differences:
158
161
159
- - Better support of accentuated characters.
162
+ - Better support of accented characters.
160
163
- The Ruby module separator ` :: ` as been replaced by the PHP namespace separator ` \ ` .
161
164
- The plural of "octopus" is "octopuses" (not "octopi"), the plural of "virus" is "viruses"
162
- (not viri) and the pural of "cow" is "cows" (not "kine").
165
+ (not viri), and the plural of "cow" is "cows" (not "kine").
163
166
- The following methods have been removed: ` tableize ` , ` classify ` , ` demodulize ` ,
164
167
` constantize ` , ` deconstantize ` and ` foreign_key ` . They can be easily implemented in specific inflectors.
165
168
- Added the ` hyphenate ` method, which is a combination of ` underscore ` and ` dasherize ` .
166
- - One specifies ` true ` rather than ` false ` to ` camelize() ` to downcase the first letter of the camel cased string.
169
+ - One specifies ` true ` rather than ` false ` to ` camelize() ` to downcase the first letter of the camel- cased string.
167
170
168
171
169
172
170
173
## Getting started
171
174
172
175
** Inflector** expects to work in UTF-8, which is the default encoding character set starting
173
- PHP 5.6, for older versions please use ` mb_internal_encoding() ` as follows:
176
+ PHP 5.6, if your configuration is different, use ` mb_internal_encoding() ` as follows:
174
177
175
178
``` php
176
179
<?php
@@ -210,3 +213,8 @@ this project and its community, you're expected to uphold this code.
210
213
## Contributing
211
214
212
215
See [ CONTRIBUTING] ( CONTRIBUTING.md ) for details.
216
+
217
+
218
+
219
+ [ lib/Inflections/ ] : lib/Inflections/
220
+ [ lib/Inflections/en.php ] : lib/Inflections/en.php
0 commit comments