I have created a custom email template, all works well everything is shown, except when I use the trans dictionary to translate a string from English to German, the translation does not seem to work.

I have provided a de_DE.csv file but still the text it not being translated. Cleared cache, reindexed.

3 Answers 3


Magento 2 Translation in Custom Email Template
For Example:

{{trans "Shipping Info"}}

First, create a CSV file in your theme with the name de_DE.csv


Add your English and DE translation text in the double quote like below:

Use for Email:

"Shipping Info","Lieferadresse",module,Magento_Email

Use for the Whole website:

"Shipping Info","Lieferadresse"

  • very nice explanation thanks @Vikram Kumar Sep 12, 2020 at 13:10
  • welcome @NavinBhudiya Sep 12, 2020 at 13:10

For Email template translate string in m2 you need to wirte code like this.

{{trans "%items are shipping today." items=shipment.getItemCount}}

and when you check in browser, you need to clear cache and local storage from Broswer. http://prntscr.com/r02pu4


it's mistake, used : instead of , in the csv file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.