Magento Multi Language, Currency & Region Setup

Feb 22, 2011

Several options here depending on exactly what you need. Currency can be handled at website, Store or Store level and if multiple currencies are set “as allowed” then the currency changer will show up. By default this appears in the left sidebar and is added in using the directory layout file (why directory?). To move this to the header, comment out the directory bit and move it to the page layout file – inside the header block. You also need to add a “get child html” to the header template itself.

Language can be done one of two ways. Simplest is by adding multiple store views (each with a different language) to a store. This will then show the language switcher in the header. If you need each language to use different products (because of pricing etc.) then you need to create one store for each language and one store view – this makes the store changer appear in the footer and you want to move this to the header in the same way as the currency.

Here is the relevant content from my new page layout…

<block type="page/html_header" name="header" as="header">
    <block type="page/template_links" name="top.links" as="topLinks"/>
    <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
    <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
    <block type="directory/currency" name="currency" as="currency" template="directory/currency.phtml"/>
    <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
      <label>Navigation Bar</label>
    </block>
    <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>

And the extra bits added to the header template (found in page/html/header.phtml)…

getChildHtml('store_language') ?>
getChildHtml('store_switcher') ?>
getChildHtml('currency') ?>