SQL-Ledger Homepage

SQL-Ledger User Forum

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

"text_amount" and "decimal" in French (General)

posted by JayArr(R), Mission BC Canada, 31.12.2017, 16:28

Hi all

All of my install runs in english but I want to be able to send out
invoices in french to my customers who speak french.

I looked at the stock french invoice in the /templates directory but it
wasn't nearly as nice as the English form so I've edited the english one
and saved it in the French subfolder. So far so good, my wife is fully
bilingual and has helped with all of the translation except for one

The text written line of the total amount, eg:

Four Hundred Forty Five ***** 41/100

in invoice text it looks like this:

text_amount ***** decimal/100

Of course it's still in English. and to get this in French I need to
where the code is that produces "text_amount" and I will have to write a
duplicate french subroutine and then find a way to call it when the
customer is French. I have written this kind of subroutine before for
payroll software that needed to print it out on cheques so I'm kind of
familiar with it, I imagine this subroutine exists as a small stand
pice so it can be used on cheques and perhaps other places in

Can anyone point me to where this subroutine is? I'll be happy to
contribute back my French-Invoice.tex and any other code I write to the


There is no need to write a subroutine.

Either use french as your language or setup a new language.

Set up the new language in System -> Language, the code must be the same as
the language in the locale directory (i.e. fr), the description can be
anything you like.

Then select the Language when you print the invoice.

Make sure Num2text exists in the locale/fr folder.

Very cool Dieter that worked great. I had originally set up the language with the code as "FRENCH" and so I wasn't linking properly. I changed to "fr" and now I get Quatre Cent Quarante Cinq ***** 41/100 - perfect.

Now, one last tiny detail...

My wife has pointed out that the term GST isn't used in french, it's an acronym and it doesn't translate. In french it's TPS. It's the same federal tax it's just got a french acronym. Is there any way to get the term "taxdescription" to return "PTS" instead of "GST" when the customer is French?

& taxdescription on taxbase & tax \\


Complete thread:

Back to the forum
Board view  Mix view
1002 Postings in 334 Threads, 335 registered users, 108 users online (0 registered, 108 guests)
SQL-Ledger User Forum | Admin contact
powered by my little forum