i am trying to translate

<p>  $this->__('You are receiving this notification because you subscribed to receive alerts when the following products are back in stock:') </p>

in frontend/base/default/template/email/productalert/stock.phtml. but it is not working and still in english in product alert email.

does anyone knows it?

  • this file (/base/default/template/email/productalert/stock.phtml.) is being passed as block argument in app\locale\"Language"\Mage_ProductAlert.csv.
    – Guru
    Dec 26, 2013 at 14:32
  • What language are you trying to translate it into? Also, did you use a Magento translation pack or did you create your own?
    – kab8609
    Dec 26, 2013 at 15:33
  • i am trying to translate it to Norwegian (nb_NO). that is trnslation pack i am using. thanks:)
    – Guru
    Dec 26, 2013 at 15:37
  • I have the very same issue. Translation strangely only doesn't work in one locale. All others work fine. Also, if I output the string in the frontend, it is translated correctly according to the locale.
    – Louis B.
    Jul 6, 2015 at 13:38

2 Answers 2


How do you try to translate the string? If it is in locale.csv in your theme directory it should work. If it doesn't, check for typos.

If you added your own module and added there a translation file, please check whether dev mode is on. In dev mode magento only translates string in the correct files to prevent, that you deliver modules with missing translations.

If all of this doesn't fix your problem, please hook with xdebug into your translation and have a look into Mage::getTranslator()->getData() there should be all strings which are translated and you can compare whether it is correct. Maybe it is prefixes with Mage_CatalogInventory::

  • Thank you very much. it is giving this error "The language 'nb_NO' has to be added before it can be used. in /public_html/lib/Zend/Translate/Adapter.php on line 430" and then "No translation for the language 'nb' available. in /public_html/lib/Zend/Translate/Adapter.php". Could you please help me how to resolve it. Thanks again :)
    – Guru
    Dec 28, 2013 at 0:38

First of all, i want's to explain how translation works for different locale. Below are the sequence translation loads while rendering page.

1- Module translation files under app/locale/[locale]/*.xml
2- Theme translations in the translate.csv file located in the theme
locale/[locale]/ directory 
3- Translations stored in the DB table core_translate

So now according to above sequence check the text and you can able to resolve your issue with translation.

  • thanks Bijal. i have checked everything mentioned above, but still translation does not work in this file frontend/base/default/template/email/productalert/stock.phtml.
    – Guru
    Dec 27, 2013 at 7:30
  • Try to clear browser cache and also magento cache, and than check Dec 27, 2013 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.