Magento get language code in template file

前端 未结 6 1981
余生分开走
余生分开走 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:37

    For use in the html elements lang attribute etc.

    echo strtolower(Mage::getStoreConfig('general/country/default')); // "en"
    

提交回复
热议问题