How can I get "original" category name in Magento where I already translated category name for current store view. I would like to get category name as entered in All Store views because I would like to send original (English) name to GA for tracking - I need this when I'm on category page.
I can get localized category name in this way:
<?php
$currentCategory = Mage::registry('current_category');
$name = $currentCategory->getName();
?>
But couldn't find a way to get untranslated name without additional calls to database.
As mentioned above, this will need additional database requests. The following should work:
$defaultStoreCategory = Mage::getModel('catalog/category');
$defaultStoreCategory->setStoreId(Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID);
$defaultStoreCategory->load($currentCategory->getId());
$name = $defaultStoreCategory->getName();
Try with this code
$storeId = Mage::app()->getStore()->getId();
$product = Mage::getModel('catalog/category')
->setStoreId(Mage::app()->getStore()->getId())
->load(YOUR_CATEGORY_ID);
Hope this helps.