InvoiceGenerator
InvoiceGenerator copied to clipboard
How to change DIČ and IČ to VAT and TIN?
Hi! How to change DIČ and IČ to VAT and TIN? The os.environ["INVOICE_LANG"] = "en" doesn't help.
I ran into the same problem. A quick look at the source code reveals that the right way to achieve this is to create a pull request to locale directory and add gettext
localization there, since the PROJECT_ROOT
resolves to the library directory.
The code is ugly and I prefer to use ReportLab directly though.
Papersize is locked in this line of code, which is much worse. We are locked into US letter size paper if we use this library. No simple or easy way to work around this.
@mihalt There's something wrong with the translation files causing this. All the strings in the source code are in English, but this particular line, for some reason, is getting translated into Czech:
>>> os.environ["INVOICE_LANG"]
'en'
>>> _(u"Vat in: %s")
'DIČ: %s'
If I delete the translation files, the line is correctly not translated and is returned as "Vat in: %s". So if you don't need localization, you can just delete those babel files in the locale directory.
(Mostly posting this in case someone tries to use this library in 2023+ as I did and has the same question)