Translation problem when printing documents

Hello everyone,

We’ve noticed an issue with translations in document print formats.
Fields of type HTML are not being translated when printing documents, even though the translations work correctly when viewing the document itself (example document Product Bundle).

Has anyone else encountered this problem or found a workaround?

View of the document

Printed doctype, fields of type HTML is not translated

Thanks in advance for your help!

this is one print formats or 2

Thank you for your reply. I didn’t fully understand your response. Could you explain it in a bit more detail?

I said do you have 1 print format for both languages or 2 separte print formats for 2 languages

Hello @aratsimba,

I don’t know if this will help, but try to add _ before the variable call.

Example

{{ my_english_text_variable }}

{{ _(my_english_text_variable) }}

Just 1 print format (the default one) cause I suppose texts should be translated regardless of the print format used.

Hello @AGHILES667
Yes, it should be like that. But I the text is in the CORE of ERPNEXT, I was wondering if there was a way to make it “translatable” without touching the core code of Erpnext.

Thanks for your reply.

One print format. When I view the document, the html field type is translated. But when I print (by clicking the button print), the html field is not translated in the preview print.

i’ll suggest u use 2 differnet formats

1 Like