new language

33 views
Skip to first unread message

v.pi...@gmail.com

unread,
Nov 17, 2017, 2:43:05 AM11/17/17
to FAQ - Invoice Templates by Invoicebus https://invoicebus.com/templates
Hello,

How can I add my own language template ?
I would like to integrate template to my web app. 
Choosing language through URI is fine for me.

Great work, anyway!


BR
Vygandas

Dimitar Stojanov

unread,
Nov 17, 2017, 7:52:07 AM11/17/17
to FAQ - Invoice Templates by Invoicebus https://invoicebus.com/templates
Hi Vygandas,


To add a new language you need to make custom adjustments to the invoice generator files, and use that generator locally for your templates.
First, download the invoice generator file from the GitHub repo https://github.com/Invoicebus/html-invoice-generator/

Then you need to edit the main javascript file /src/js/generator.js file and add your desired language in the ib_languages object with the appropriate translations.

After that in the docs folder in every subfolder, you need to add an appropriate file with the translation. For example, if you want to add "Dutch" language with the language code "nl" you need to add these files:

  • /src/docs/how-to/how-to-nl.js
  • /src/docs/raw-data/raw-data-nl.js
  • /src/docs/save-state/save-state-nl.js
And at the end, you need to add appropriate invoice label translations in the /src/lang/ folder, named nl.txt.

If you need any help don't hesitate to contact us, and I'll prepare the translation files for you.


Best,
Dimitar
Reply all
Reply to author
Forward
0 new messages