I am trying to remove language switcher and to do this I have added a line in:


I just add a line in <body>

<referenceBlock name="store_language" remove="true"/>

Executed deployment script, but I am still seeing Magento_Store/templates/switch/languages.phtml in profiler files list

Any idea what should do to resolve it?

  • Is this now display in header or not?you are doing correct way please clear all cache manually and again try.
    – akgola
    Mar 13 '19 at 6:06
  • Actually I havn't called it in header, but file is appearing in profiler. Yes I did clear cache manually Mar 13 '19 at 6:11
  • you have run again deploy command? Mar 13 '19 at 6:22
  • @RakeshDonga yes, ran it multiple times, but it is still appearing on profiler list Mar 13 '19 at 6:25
  • You can do it CSS way magento.stackexchange.com/questions/205694/… Mar 13 '19 at 10:30
  1. <referenceBlock name="store_language" remove="true"/> should work, try to clean the cache :

    php bin/magento c:c && php bin/magento c:f.

  2. If it doesn't work, try to enable the template and block path hints : Stores > Configuration > Advanced > Developer > Debug and look the block name of the store switcher. if there no block, that means that the switcher has beed added in a phtml, in this case you have to do it in directly in that phtml.

  • Thank you for the answer :) But it didn't work for me :(... Cleared cache as you said. enabled template hint, there is no block found with the name switcher found, but still profiler showing ..Magento_Store/templates/switch/languages.phtml :( Mar 14 '19 at 9:41
  • It's strange, look in your theme if you have Magento_Store/templates/switch/languages.phtml ?
    – Aamir
    Mar 14 '19 at 9:44
  • Yes it is in my theme Mar 14 '19 at 9:45
  • ok, try to update it, and look if you see the changes in storeswitcher
    – Aamir
    Mar 14 '19 at 9:47
  • Thank you for the point of view that you have given, I have checked in DOM, file is not loading in DOM, but only profiler is showing it. I think it is not a problem if it is not showing in DOM Mar 14 '19 at 9:49

Add below code default.xml file which is located in layout folder

enter image description here

Run command: php bin/magento c:c && php bin/magento c:f to clean cache

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.