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.
Thanks,
brittanie7246
January 16, 2014
Hey there Swift question that’s thoroughly out topic.
Have you any idea steps to make a website smartphone helpful? My web site appears to be strange when searching from my telephone.
I’m looking for a concept or plug-in that could possibly clear up this condition. If you have any suggestions, please share.
Thanks a lot.
Bilal Momin
February 15, 2014
Hi Brittanie, Can you be more specific about the crimps your website is facing. Is your website built in Magento? If there is anything I can be of help, you are free to reach me out anytime. We surely can come up with a solution for it.