innoveit / play2-pdf

A PDF module for Play Framework 2
MIT License
77 stars 22 forks source link

How can I use Messages & Internationalization in a PDF? #23

Closed ChickenSniper closed 7 years ago

ChickenSniper commented 7 years ago

i.e. play.api.i18n.Messages

I need to generate my PDFs based on a user's preferred language. How would I do this with this package?

marcosinigaglia commented 7 years ago

Hi, the Messages works in the same way, if you need to force a language you have to pass as parameter to the template. @Messages.get(Lang.forCode(language), "lbl.welcome")