0

I would like to use translations from my own extension. I've created helper and translation file in different locales. But Magento shown me translation from Mage_ locale There is my code:

<global>
    <helpers>
        <myextension_base>
            <class>Myextension_Base_Helper</class>
        </myextension_base>
    </helpers>

under global in config.xml

<frontend>
    <translate>
        <modules>
            <Myextension_Base>
                <files>
                    <default>Myextension_Base.csv</default>
                </files>
            </Myextension_Base>
        </modules>
    </translate>
</frontend>

in template Mage::helper('myextension_base')->__('Cart')

I've created files in en_US and de_DE

Where I do something wrong?

UPD Looks like Mage_ translations has priority or my translation placed after Mage_ translations

  • make your module depend on the checkout module. this way it will be loaded after the core one and (most probably) it will override the core translations. – Marius May 12 '16 at 14:46
1

Based on the comments.
Your module should depend on Mage_Checkout.
This way it will be loaded after it and it will override the translations.
This can be done by making the file app/etc/modules/Myextension_Base.xml look like this:

<config>
    <modules>
        <Myextension_Base>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Checkout>
            </depends>
        </Myextension_Base>
    </modules>
</config>

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.