page 1 of 1
Comments: 10 | Views: 5820
Tonatiúh
Tonatiúh
Cuali itcha a cosamalot
I have written the couple of functions herein linked, as a mean to translate any quantity expressed as a number, to its correspondent verbalized form, wich is given as the function output in Spanish, as used to be commonly needed, in México at least, for printing invoices, payroll envelops, checks and many other documents which deal with pesos.

I do not know if this is useful in other countries, but I think it should be. So, I am starting this thread to get some help for:

1) To know if there are any other country than México using in any way verbaly expressed quantities.

2) If it is so, what are that country language verbal expression for quantities.

NOTE: This functions have been coded for MS Access 95 VBA (1997), MS Word 98 VBA (2001), VB 6.0 (2002), VBScript 5.6 (2003). Now I am looking for update them for VB.NET, C#, J# and ASP.NET (JScript).

Carlos Bardullas
Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...
What do you mean by "country language verbal expression for quantities"? Are you just talking about numbers in word form (forty-two, twee en veertig, zwei und vierzig, quarante-deux, yon-juu-ni)? Or do you mean something like class identifiers, such as the Japanese use (birds would be counted differently from cars, for instance)?
Maurits
Maurits
AKA Matthew van Eerde
Hmmm... could you do feminine forms for languages that have the distinction?
Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...
Tonatiúh wrote:
NOTE: Or better simple: How you translate 123,456,789,000.00 to that language of you? (I think I can manage the required changes to the translation algorithm, but certainly I will need to know about any special cases).

My language is Dutch, and that number would be:
honderd drie en twintig miljard vier honderd zes en vijftig miljoen zeven hondred negen en tachtig duizend.

What is interesting is that in Dutch (and German too) we reverse numbers between 20 and 100 (between ten and 20 they are all exceptions), so instead of saying "forty-two", we say "two and forty" (twee en veertig).

The Japanese (and Chinese) have one of the simplest counting systems in the world. You need to know 1 through 10, 100, 100, 10000 and everything else is derived from that (until you get to 100000000). So 42 is said as four-ten-two (yon-juu-ni), 4573 would be said as four-thousand-five-hundred-seven-ten-three (yon-sen-go-hyaku-nana-juu-san), perfectly regular. The only weird things that happen here is that 1,000 is not their separator, 10,000 is. It has its own word (man) and above that you combine: 100,000 is ten-tenthousand (juu-man). The only irregularities are a bunch of contractions: 300 (sanbyaku instead of san-hyaku) 600 (roppyaku instead of roku-hyaku), 800 (happyaku instead of hachi-hyaku) and 8000 (hassen instead of hachi-sen).

Of course, the Japanese muddy it up a bit by having both this system (the Chinese system) and their own Japanese system for numbers one through ten. Perplexed
Maurits
Maurits
AKA Matthew van Eerde
There are various Lingua::*::Number Perl modules on CPAN to translate numbers into various languages.

Note in British English "one billion" is a thousand times as large as "one million" is in American English

EDIT: In particular Lingua::ES::Numeros may be of interest to you
EDIT2: Since Sven brings up Dutch...

Lingua::NL::Numbers
<BR>  use Lingua::NL::Numbers;<BR>    <BR>  my $numbers = Lingua::NL::Numbers->new;<BR><BR>  my $text = $numbers->parse( 123 );<BR><BR>  # prints 'een honderd, drie en twintig'<BR>  print $text;<BR>

If you want to make a truely global system, you should be aware that not all languages use groups of three digits in their numbering systems. In India it is common to see the lowest group of three digits and then groups of two.

12,34,56,789.00

 

page 1 of 1
Comments: 10 | Views: 5820
Microsoft Communities