Hi, the site I’m working based on jm_sterix has 4 languages enabled. I do not see any way to select language on the iphone template. Is it posible to add the language selector on the iphone interface?
2 answers
Hi mate,
you can open the default layout for iphone theme of app\design\frontend\default\jm_sterix_iphone\layou t\page.xml, adding there the language switch into the header so look for this block tag
HTML Code:
<block type="page/html_header" name="header" as="header"> <block type="page/template_links" name="account.links" as="accountLinks"/> <block type="page/template_links" name="top.links" as="topLinks"/> <block type="page/template_links" name="checkout.links" as="checkoutLinks"/> <block type="core/text_list" name="top.menu" as="topMenu" translate="label"> <label>Navigation Bar</label> <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/> </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>
change it to
HTML Code:
<block type="page/html_header" name="header" as="header"> <block type="page/template_links" name="account.links" as="accountLinks"/> <block type="page/template_links" name="top.links" as="topLinks"/> <block type="page/template_links" name="checkout.links" as="checkoutLinks"/> <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/> <block type="core/text_list" name="top.menu" as="topMenu" translate="label"> <label>Navigation Bar</label> <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/> </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>
Now you can open the template file of app\design\frontend\default\jm_sterix_iphonetempl ate\page\html\header.phtml to put the language switch block of
PHP Code:
<?php echo $this->getChildHtml('store_language') ?>
To the place where you want the language switcher displaying
It works, thanks again!
This question is now closed