Pluralize English words

Posted by jmls on 01-Sep-2013 15:48

In one of the projects that I'm working on, we have a need to pluralize words.

Attached is a class to do such a thing (download and install into a folder called dotr in your propath)

If you are bored on a Sunday night and wish to partake in a "I know English better than you do" contest, please feel free to add exceptions to this class : or just comment below about which words are wrong

11.3 and upwards :

message new dotr.string():PluralizeWord("goose") view-as alert-box.

10.2B - 11.2

message (new dotr.string()):PluralizeWord("goose") view-as alert-box.

[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/string.cls.zip:550:0]

All Replies

Posted by Ruanne Cluer on 08-Oct-2013 01:39

Brother, we use brothers in both speech and writing.

While "Brethen" is strictly correct, it's only used today in certain modern religious scenarios which use the language of the King James Bible, or when mocking or affectionate use of the plural by using the archaic, religious ring.

You may wish to add (and I'm sure there are more):

man = men

memo = memos

mouse = mice

phenomenon = phenomena

index = indices

criterion = criteria

thesis = theses

cactus = cacti

fungus = fungi

syllabus = syllabi

nucleus = nuclei

datum = data

data = data

medium = media

media = media

end in -f change the f to a v and add -es.

end in -fe to a v and add -es.

except for:

dwarf = dwarfs

roof = roofs

and the plural of "penny" is "pence" when referring to a quantity of money and "pennies" when referring to a number of coins, not sure how you'd code around that one ;)

This thread is closed