Generate TCPDF file in two languages

CedricCQ 18 Jul, 2018
Hi !

I want to send by e-mail a PDF invoice to my customers. It works great with Chronoforms and TCPDF, but my website has two languages and I want to be able to send a PDF in french if the locale is set to fr_FR and in german if the locale is set to de_DE (my company logo is not the same for these two languages).

It is possible to generate two separates TCPDF files with an event switcher ? Is there a shortcode that's tell me which language is actually in use ?

Thank you.

Best regards,

Cédric
GreyHead 18 Jul, 2018
Answer
1 Likes
Hi CedricCQ,

You can use an Event Switcher to create two different PDFs. Personally I'd probably create the template there as a form variable and then use a single TCPDF action after the Event Switcher to actually create the PDF.

The Joomla Language functions should let you get the current language info. See this StackOverFlow answer.

Bob
CedricCQ 18 Jul, 2018
Thanks a lot Bob, it works🙂

Best regards,

Cédric
This topic is locked and no more replies can be posted.