I want to translate a frontend Magento store using only one csv file. So I've done this:
I've created a custom module called Translator. In its config.xml I've put these lines:
<config>
....
<translate>
<modules>
<MyPackage_Translator>
<files>
<default>MyPackage_Translator.csv</default>
</files>
</MyPackage_Translator>
</modules>
</translate>
</config>
Then I've created de default Data.php helper in my Helper folder.
Then in app/locale/de_DE I've created the MyPackage_Translator.csv file where I put all my strings.
Now, if in a phtml(regardless the module) file, if I do something like:
echo $this->__('My string');
it works pretty well. But I'm curios why does Magento looks in the MyPackage_Translator.csv for the string?
I also noticed that, if I'm using $this->__('some string'); in the Customer module, Magento will look first in app/locale/de_DE/Mage_Customer.csv file for the string, and if it doesn't find the string there, then it will look in my MyPackage_Translator.csv file. Why is that? Why it doesn't look in Enterprise_Customer.csv file for example?
Can someone explain me the workflow Magento does when it's looking for the translation file?