1

We're new to Magento and have made a little module (Module_Catalog) that extends from the Mage_Catalog and we have some custom functionality in Mage_Catalog_Block_Navigation to create a custom menu, which all works fine.

We currently have an issue with translation files; we created custom translation files called "Module_Catalog.csv" in /app/locale/[de_DE|en_US]/ which are referenced from the config.xml.

Currently the translation files are working on our Windows dev environments, but not on the Linux staging server. Initially I though that it was an issue with the translation files, however running this test: Mage::getConfig()->getModuleConfig('Module_Catalog')->is('active', 'true'); returns false. I've also been logging Mage::log("loadModuleTranslation: " . $moduleName, null, "Module.log"); in Translate.php in the foreach that loads the transations and our module is not showing up there.

When I test Mage::getConfig()->getModuleConfig('TM_EasyTabs')->is('active', 'true'); (another module that is installed) and that returns true. I've tested this in several locations.

In local.xml we load our model like this:

<config>
    <global>
        <blocks>
            <catalog>
                <rewrite>
                    <navigation>Module_Catalog_Block_Navigation</navigation>
                </rewrite>
            </catalog>
        </blocks>

And the config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Module_Catalog>
            <version>0.1.0</version>
        </Module_Catalog>
    </modules>
    <global>
        <blocks>
            <catalog>
                <rewrite>
                    <class>Module_Catalog_Block</class>
                </rewrite>
            </catalog>
        </blocks>
        <helpers>
            <catalog>
                <rewrite>
                    <class>Module_Catalog_Helper</class>
                </rewrite>
            </catalog>
        </helpers>
    </global>
    <frontend>
        <translate>
            <modules>
                <Mage_Catalog>
                    <files>
                        <default>Module_Catalog.csv</default>
                    </files>
                </Mage_Catalog>
            </modules>
        </translate>
    </frontend>
    <adminhtml>
        <translate>
            <modules>
                <Mage_Catalog>
                    <files>
                        <default>Module_Catalog.csv</default>
                    </files>
                </Mage_Catalog>
            </modules>
        </translate>
    </adminhtml>
</config>

I'm pretty sure that the language files are working properly (because they're fine locally) but on the staging environment they won't load.

What are we forgetting / doing wrong?

  • 1
    Just a wild thought. Did you put into production the declaration file located in app/etc/modules ? – Marius Dec 5 '14 at 13:00
  • Marius, I think I love you now. After 2 days of floating around in a life raft. You have saved me! – Richard Dec 5 '14 at 13:10
2

Just so this question would have an answer. Based on the comments.

The declaration file of the module is missing. app/etc/modules/Module_Catalog.xml

| 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.