magentolanguage-switching

Magento language switch shows twice


I am building a webshop with Magento. I downloaded a free theme called HelloWired. I use English and Dutch in my webshop. There is a language switcher which lets the customer switch between those languages.

My problem is that this switch shows up twice. I checked the layout file page.xml and I noticed that it gets mentioned there twice. But if I remove one of them, it either does nothing, or removes both..

Who can help me remove one of the language switches?

This is code from the page.xml file:

    <block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">

        <block type="page/html_head" name="head" as="head">
            <action method="addJs"><script>lib/ccard.js</script></action>
            <action method="addJs"><script>prototype/prototype.js</script></action>
            <action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</script></action>
            <action method="addJs"><script>prototype/validation.js</script></action>
            <action method="addJs"><script>scriptaculous/builder.js</script></action>
            <action method="addJs"><script>scriptaculous/effects.js</script></action>
            <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
            <action method="addJs"><script>scriptaculous/controls.js</script></action>
            <action method="addJs"><script>scriptaculous/slider.js</script></action>
            <action method="addJs"><script>varien/js.js</script></action>
            <action method="addJs"><script>varien/form.js</script></action>
            <action method="addJs"><script>varien/menu.js</script></action>
            <action method="addJs"><script>mage/translate.js</script></action>
            <action method="addJs"><script>mage/cookies.js</script></action>

            <action method="addItem"><type>skin_js</type><name>js/jquery-1.7.1.min.js</name></action>                
            <action method="addItem"><type>skin_js</type><name>js/imgpreview.js</name></action>
            <action method="addItem"><type>skin_js</type><name>js/hello.jquery.js</name></action>
            <action method="addItem"><type>skin_js</type><name>js/less.min.js</name></action>   
            <action method="addItem"><type>skin_js</type><name>js/respond.min.js</name><params/><if>IE</if></action>
            <action method="addItem"><type>skin_js</type><name>js/cufon-yui.js</name></action>
            <action method="addItem"><type>skin_js</type><name>js/jquery.cycle.all.js</name></action>
            <action method="addItem"><type>skin_js</type><name>js/custom.js</name></action>

            <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
            <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
            <action method="addCss"><stylesheet>css/responsive.css</stylesheet></action>
            <action method="addCss"><stylesheet>css/custom.css</stylesheet></action>
            <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
            <action method="addItem"><type>skin_js</type><name>js/pngfix.js</name><params/><if>lt IE 7</if></action>
            <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>

            <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>

            <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
        </block>

        <block type="core/text_list" name="after_body_start" as="after_body_start"/>

        <block type="page/html_notices" name="global_notices" as="global_notices" template="page/html/notices.phtml" />

        <block type="page/html_header" name="header" as="header">
            <block type="core/text_list" name="top.menu" as="topMenu"/>
            <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
            <block type="page/template_links" name="top.links" as="topLinks"/>
            <block type="page/html_wrapper" name="top.bar" as="topBar" translate="label">
                <action method="setElementClass"><value>top-bar</value></action>
                <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
            </block>
            <block type="catalog/navigation" name="mobile-nav" as="mobile-nav" template="catalog/navigation/mobile-nav.phtml" />
            <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
                <label>Page Header</label>
                <action method="setElementClass"><value>top-container</value></action>
            </block>
            <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
        </block>

        <block type="core/text_list" name="left" as="left" translate="label">
            <label>Left Column</label>
        </block>

        <block type="core/messages" name="global_messages" as="global_messages"/>
        <block type="core/messages" name="messages" as="messages"/>

        <block type="core/text_list" name="content" as="content" translate="label">

            <label>Main Content Area</label>


        </block>

        <block type="core/text_list" name="right" as="right" translate="label">
            <label>Right Column</label>
        </block>

        <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
            <block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
                <label>Page Footer</label>
                <action method="setElementClass"><value>bottom-container</value></action>
            </block>
            <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
            <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
        </block>

        <block type="core/text_list" name="before_body_end" as="before_body_end"/>
    </block>

    <block type="core/profiler" output="toHtml" name="core_profiler"/>
</default>

<print translate="label" module="page">
    <label>All Pages (Print Version)</label>
    <!-- Mage_Page -->
    <block type="page/html" name="root" output="toHtml" template="page/print.phtml">

        <block type="page/html_head" name="head" as="head">
            <action method="addJs"><script>lib/ccard.js</script></action>
            <action method="addJs"><script>prototype/prototype.js</script></action>
            <action method="addJs"><script>mage/translate.js</script></action>
            <action method="addJs"><script>prototype/validation.js</script></action>
            <action method="addJs"><script>varien/js.js</script></action>

            <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
            <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
            <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
            <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>

            <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
            <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>

        </block>

        <block type="core/text_list" name="content" as="content" translate="label">
            <label>Main Content Area</label>
        </block>

    </block>
</print>

Solution

  • Try to locate the .phtml file of your theme which builds the page. For example if the lang switcher is at the header, you need to find the header.phtml. Inside this file is probably this code $this->getChildHtml('store_language') or some other code related with store language, twice.