I want to translate english to other indian languages like punjabi, marathi and more.I have created an module. In which Getiing product collection. once I reacieved the data in english I can translate into into india laguages. Array I recieved in english I want to convert all the element of array in hindi and rest of content, Like CMS pages contnet, Order Content Etc.

Product collection

Controller file of Extension

public function chnageslang(){

             $Option = Mage::getResourceModel('catalog/product_option_collection')->addFieldToSelect('product_id');
            $entityIds = new Zend_Db_Expr($Option->getSelect()->__toString());

            if (!empty($n_collection['collection'])) {
                $prod[$h]['type'] = $this->__('New Arrival');
                $prod[$h]['type_id'] = 'new';                    
                $newcollection = $this->collectionDetail($n_collection['collection']);
                $prod[$h]['product'] = $newcollection ? $newcollection : array();
            } else {
                $prod[$h]['type'] = $this->__('New Product');
                $prod[$h]['type_id'] = 'new';
                $prod[$h]['product'] = array();


You can simply create a locale file in your language and translate every string in csv with "english string, your language string"

| improve this answer | |

You have to put your word in traduction function, then you create your local translate

  1. <?php echo $this->__('Your word'); ?>


    <?php echo Mage::helper('yourhelper')->__('Your word'); ?>

  2. you create your local file in : app/design/frontend/{your package}/{your theme}/locale/{language_ISO}/translate.csv

    "Your word","translation"
  3. choose your store view of this language, then you'll find your translation so pretty

| improve this answer | |

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.