Change header link text in Magento 2

0
63
Change header link text in Magento 2
Change header link text in Magento 2

For today’s Magento 2 development tip, I will show you how to change header link text in Magento 2.

Change header link text in Magento 2

This is actually pretty much easy and does not take lot of effort to do.

In your current theme, add new a new file i18n/en_US.csv, so if your theme is at app/code/Vendor/theme, then the file location will be app/code/Vendor/theme/i18n/en_US.csv.

The content of the CSV file is the mapping key-value, first column is the text to be changed, second column is the new value.

So if you want to change the header link text like:

  • "Sign In" to be "Login"
  • "Create an account" to be "Register".

Then the CSV content file will be:

"Sign In", "Login"
"Create an account", "Register"

Refresh the cache, and you will see the texts updated.

Conclusion

As you can see, it is pretty easy to change header link text in Magento 2.

Have fun ~