I am designing a theme in Magento 2 using blank theme as parent theme. I would like to change text on some of the the top links like this:

From "Compare Products 1 items" into "Compare (1)"

From "My Wish List 1 items" into "Wish List (1)"

From "My Cart 1 items" into "Cart (1)"

How do I accomplish that?

2 Answers 2


In your theme create i18n/en_US.csv with the following

"Compare Products %1 items","Compare (%1)"
"My Wish List %1 items","Wish List (%1)"
"My Cart %1 items","Cart (%1)"

See https://github.com/magento/magento2/tree/develop/app/design/frontend/Magento/luma/i18n

  • This is the best solution to use because you can make the change for individual languages without the need for writing a plugin, overriding code files or worse, editing core files. Translation files should always be used where possible! Feb 7, 2018 at 14:08

you have to do it though plugin also

write plugin for getLabel() function for below class


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.