I'm working on check printing and I have run off the end of my limited
knowledge about internationalization.

I was just having fun reproducing the part of Common LISP "format"
that converts numbers into words, i.e. 22,345,100.45 => "twenty-two
million, three hundred forty-five thousand, one hundred and 45/100"
when I suddenly realized what a pain in the butt this could be.

My approach uses three string tables:

(define small-numbers
  #("zero" "one" "two" "three" "four" "five" 
    "six" "seven" "eight" "nine" "ten"
    "eleven" "twelve" "thirteen" "fourteen" "fifteen"
    "sixteen" "seventeen" "eighteen" "nineteen" "twenty"))

(define medium-numbers
  #("zero" "ten" "twenty" "thirty" "forty" "fifty"
    "sixty" "seventy" "eighty" "ninety"))

(define big-numbers
  #("hundred" "thousand" "million" "billion" "trillion"
    "quadrillion" "quintillion"))

guile> (number-to-words 1234.56334 100)
"one thousand two hundred thirty-four and 56/100"

Directly internationalizing these strings and piecing them together
will yield numbers that are "almost" right in French.  The mistakes
will be 21 and any 10 * n + 1; 21, for example, will be translated as
"vingt un" but which should be "vingt-et-un".  I'm sure there are
similar problems in other languages.

I could make the small-numbers table go up to 100, which would fix
this problem; is that good enough, or should I just say that there
need to be different phrase-generation algorithms for each language?
Certainly just internationalizing the strings will result in odd
punctuation in several languages.

Do checks even have written-out amounts everywhere?  How much
variation is there in the format of checks from country to country?
What do the European versions of Quicken do? 

Thanks,
Bill Gribble

--
Gnucash Developer's List 
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to