views:

82

answers:

2

Hello,

I'm programming an invoice script. I'm looking for a php script that convert number to letter. Exemple, the invoice show this value : 155€

The script put automatically: ONE HUNDRED FIFTY FIVE

Any ideas ?

N.B: I find some script but i want one that support FRENCH letters.

Thank you :)

A: 

If you can't find a French script, take an English one and convert this to do what you're after - it'll be close enough to what you need, and should need little more than changing the number words to French.

Will A
+1  A: 

See:

To convert to French with Numbers_Words, you do:

// include class
include("Numbers/Words.php");

// create object
$nw = new Numbers_Words();

// convert to string
echo "3000000 in words is " . $nw->toWords(3000000, 'fr');
                                                     ^
                                             Language Specified
Sarfraz
-1 for answering a duplicate you answered just yesterday and for not closevoting.
Gordon
@Gordon: I did not see closing there and i did not close this in the first place because this required a different language, that is french.
Sarfraz
`Number_Words` is multilingual and that is explicitly stated in the linked duplicate.
Gordon
@Gordon: As i said i did not see those closings, my bad, i second you on your closing though.
Sarfraz
Personally, I dont think the language thing makes this a different question. Answering it smells like repwhoring to me. But that's just my opinion. I'll remove the downvote since you did indeed answer to what actually wasnt blatantly copied from the duplicate. So technically it is a correct answer.
Gordon