title: How does Magento translate works?
body: <p>I want to translate a frontend Magento store using only one csv file. So I've done this:</p>
  
  <p>I've created a custom module called Translator. In its config.xml I've put these lines:</p>
  
  <pre><code>&lt;config&gt;
  ....
  &lt;translate&gt;
  &lt;modules&gt;
  &lt;MyPackage_Translator&gt;
  &lt;files&gt;
  &lt;default&gt;MyPackage_Translator.csv&lt;/default&gt;
  &lt;/files&gt;
  &lt;/MyPackage_Translator&gt;
  &lt;/modules&gt;
  &lt;/translate&gt;
  
  &lt;/config&gt;
  </code></pre>
  
  <p>Then I've created de default Data.php helper in my Helper folder.</p>
  
  <p>Then in app/locale/de_DE I've created the MyPackage_Translator.csv file where I put all my strings.</p>
  
  <p>Now, if in a phtml(regardless the module) file, if I do something like:</p>
  
  <pre><code>echo $this-&gt;__('My string'); 
  </code></pre>
  
  <p>it works pretty well. But I'm curios why does Magento looks in the MyPackage_Translator.csv for the string? </p>
  
  <p>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?</p>
  
  <p>Can someone explain me the workflow Magento does when it's looking for the translation file? </p>