Magento 2 - translate attached PDFs

464 Views Asked by At

i try to translate my attached pdfs by the invoice in magento 2. normally i can translate all shop sites (based on html) with i18n component. but for the invoice-pdf the translation will not be used. i also tried to copy the i18n content (the *_*.csv files, e.g. en_US.csv) with the translation into:

  • vendor/zendframework/zend-i18n
  • vendor/magento/module-sales/i18n

and also into several paths in:

  • vendor/zendframework/mvc/src
  • vendor/magento/module-sales/model/order

so the question is: How can i translate the PDFs generated by Magento2?

1

There are 1 best solutions below

0
DependencyHell On

Try adding adding your translation strings to your theme file :

app/design/frontend/vendorname/themename/i18n/en_US.csv

Like this :

"Grand Total","Big Total"

Note : be careful with spaces at the end of some strings