1

enter image description here

I am translating text in the blocks with by putting text instead of categories word{{trans "Categories"}}, but I have some text with span element and I don't know how to translate them, If anyone can help, I appreciate, see the screenshot

1

Magento will automatically translate all the strings in block content if it will match with the translate CSV.

If you have string like Hello <span>John Doe</span>, Welcome

All you need to do is to add the same string in your i18n csv file like

"Hello <span>John Doe</span>, Welcome","Bonjour <span>John Doe</span>, Bienvenue"

Your Answer

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

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