Laravel 5: String Helper Methods: str_plural

Helper Method: str_plural

Standard Laravel definition:
The str_plural function converts a string to its plural form. This function currently only supports the English language.

Do not use this one!

Unless you want to hardcode your site for English language only.

Human languages are very strange sometimes and definitely very different as far as rules governing them are concerned.

Take English:
1 table
2 tables
3 tables
4 tables
5 tables
… and that rule continues – you just add s.

Take Polish:
1 stół  (means table)
2 stoły  (second form)
3 stoły
4 stoły
5 stołów (note third form).

And there are other languages.
It is better to write your own method – one that is language sensitive, where you can set language related rules, that pull proper language specific form.


If you are really bent on using it, go here for examples.

Here is sister of this function.

Also, you should not use this one.