I would like to make a notification of Sprout Email plugin bilingual.

However, in the body field, the translation filter does not work. The tag of {{ fieldname.label|t }} is not translated.

enter image description here

How is it possible to translate it?

Actually it is the same question as this, but it was asked five years ago. Translate filter and nested vocabulary properties

  • Can you clarify where you are trying to translate the {{ fieldname.label|t }} tag? I'm not sure this is the same issue as the other question you link to as fieldname.label is not a nested translation, it is just a dynamic variable outputting the label to be translated. Aug 17 '20 at 12:22
  • Two quick thoughts. You may need to add a translation category to the label you are trying to translate {{ fieldname.label|t('site') }}. If this is on the front-end, you can take a look at Craft's Static Translations docs: craftcms.com/docs/3.x/sites.html#static-message-translations. If this is code in Sprout Email (which I'm not currently seeing) could you update your question and point to the code in question. Aug 17 '20 at 12:25
  • Thank you for helping me. 1) I have already tried the tag of {{ fieldname.label|t('site') }} , but it did not solve the issue.
    – Kota.M
    Aug 17 '20 at 19:17
  • And I added a screenshot. The tag is in the template of Sprout Email, in Craft dashboard.
    – Kota.M
    Aug 17 '20 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.