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
Result for answers given in this topic for "Belgium:French" (Be_Fr):
strtolower(Mage::getStoreConfig('general/country/default')); = besubstr(Mage::getStoreConfig('general/locale/code'),0,2); = frMage::app()->getLocale()->getLocaleCode(); = fr_BENote that
Mage::app()->getLocale()->getLocaleCode() == Mage::getStoreConfig('general/locale/code')
but with the second one, you can specify an other store than default one (Mage::getStoreConfig('general/locale/code', $storeId)), so I would recommand it.