There is no standard facility in XSLT 1.0 to do this. It is available as an extension in at least one XSLT 1.0 processor (Saxon); apart from that, you will have to call out to an external library.
XSLT 2.0 has this capability as standard:
<xsl:number value="1234" format="w" lang="en"/>
outputs something like "one thousand two hundred and thirty four"
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference