1

I have this code here,

 <block class="Magento\Store\Block\Switcher" name="store.settings.language" template="switch/languages.phtml">
 <arguments>
  <argument name="id_modifier" xsi:type="string">nav</argument>
  </arguments>
 </block>

I want to disable this but it looks different from simply just adding,

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

how do disable this from showing up on the website in the header? I'm not sure where to add referenceBlock

3 Answers 3

0

You need to add below code to :

app/design/frontend/Vendor/YourTheme/Magento_Theme/layout/default.xml

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

Run Command to clear cache : php bin/magento cache:clean

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

Please clear cache and check this will work.

0

you can remove this from your backend don't need to customize your code.

first, go to your adminhtml->stores->settings->All Stores

now open your store views and set status "disable".

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.