I’m creating a custom header in Magento 2.4.4, I want to include language switcher but not the default dropdown view.
I want to include link to the second language only.
So if I have 2 languages English & French, in English I want to show only French at the header so when users click on it; it should takes them to the translated page not the home page.
2
Answers
Hi @Zee we can create a language switcher by using phtml file in design folder like this
app/design/frontend/vendor/Module/Magento_Store/templates/switch/languages.phtml
You can use below code for archive your requirement
In the below answer I am assuming that you know how to get store data.
Hope this will useful for you.
Thank you.