Video Lesson: Override and translate template text with i18n in Magento

Override and translate template text with i18n in Magento

This is premium content

Only available to enrolled or University students.
Join today to unlock all lessons in this course.

Override and translate template text with i18n in Magento

Learn how to override and translate Magento template text using i18n CSV files and locale settings.

Lesson Content

There are many times when you’ll wish to override just the text within a specific template. As long as it has been passed through one of Magento’s translation functions, there is a really simple method of overriding text that doesn’t involve overriding the entire template file.

Since we already located where this was being added to the layout XML tree, in the vendor/magento/module-wishlist/view/frontend/layout/default.xml file, we can reference this exact template which is set to this sidebar.phtml file.

If you didn’t know, if you have the Magento plugin enabled in PhpStorm, you can...

Premium content

Enroll to unlock the full content and all course materials.

Maggie

Hey, I'm Maggie! 👋

Ask me anything.

Want to chat with Maggie?

Enroll in this course for AI tutor access.

Comments

Join the discussion!

Comments

Want to comment on this lesson?

Enroll in this course to leave comments.