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
Try
$_language_code = substr(Mage::getStoreConfig('general/locale/code', $_store->getId()),0,2);
where $_store is current store object