I can see what this is leading to - a generic pluralization UDF where
you pass in the singular form and it returns the plural form if
applicable, eg. pluralize(number, singular) as in:
pluralize(2, "woman") = "women"
pluralize(2, "goose") = "geese"
pluralize(2, "mouse") = "mice"
pluralize(2, "phenomenon") = "phenomena"
pluralize(2, "medium") = "media"
pluralize(2, "focus") = "foci" 

Anyone up to coding up the rules for this?

Robin Hilliard wrote:
> 
> How about:
> 
> <cffunction returntype="string" name="s">
>         <cfargument type="numeric" name="num">
>         <cfscript>
>                 if (num neq 1)
>                         return "s";
>                 else
>                         reutrn "";
>         </cfscript>
> </cffunction>
> 
> #getGifts.recordCount# Gift#s(getGifts.recordCount)#
> 
> Perhaps a second function y() to handle the y/ies case?
> 
> Cheers,
> 
> Robin
> 
> "Andrew Dickinson" <[EMAIL PROTECTED]> wrote in message
> news:<[EMAIL PROTECTED]>...
> >
> > Should be easy.
> >
> > I've written some code to add an "s" on the end of a word if the
> > record count is either zero or plural.
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> 
> MX Downunder AsiaPac DevCon - http://mxdu.com/

-- 
Regards: Ayudh

+--------------------------------------------------------------+
| Turn on your Revenue Stream...                               |
| Bolt on a Virtual Cash Register to your e-commerce site now. |
| VeriPay from Xilo Online: http://www.xilo.com                |
+--------------------------------------------------------------+

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to