Magento get language code in template file

前端 未结 6 1964
余生分开走
余生分开走 2021-02-02 12:41

I need a helper function to get the current language code. I want to use it in a templete file, like /products/view.phtml, only for testing purposes.

Does it already exi

6条回答
  •  执念已碎
    2021-02-02 13:31

    Afaik there is no such helper function, but you could of course build your own using:

    Mage::getStoreConfig('general/locale/code', Mage::app()->getStore()->getId());
    

提交回复
热议问题