There are many occasions where we need to translate the text in external script or page to our store language which is not in English.
Suppose you want to translate some text in Chinese language then you have to include that text in locale which is zh_cn.
Please check the following code snippet for example.
<?php include_once 'app/Mage.php'; umask(0); Mage::app(); Mage::getSingleton('core/translate')->setLocale('zh_CN')->init('frontend', true); $test_strting = “test”; echo Mage::helper('core')->__($test_strting); ?>
You have to make sure that you have defined the translation in the CSV file for that particular word. By considering the above example the conversion for “test” word must be in the /app/design/frontend/package/theme/locale/zh_CN/translate.csv
Hope it will help you.