Magento get language code in template file

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

    You can get the current locale code this way :

    $locale = Mage::app()->getLocale()->getLocaleCode();
    

提交回复
热议问题