2

I try to translate a text in a function inside sales_helper_data with this code $this->__('TEXT') but it just returns the same input string.

I Also tried Mage::helper('sales')->__("TEXT"), Mage::helper('Admin')->__("TEXT"). Admin due to my module is admin module and created Mage_sales.csv in local/[lanfuage]

I Debugged the code and the Mage::app()->getTranslator()->getData() is an empty array. what's the problem?

1 Answer 1

1

I found the solution. I should add the translator file to module config.xml file

</adminhtml>
  <translate>
    <modules>
      <company_Sales>
        <files>
          <default>company_Sales.csv</default>
        </files>
      </company_Sales>
    </modules>
  </translate>
</adminhtml>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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