I'm trying out a new theme and it seems to not get the translations properly. If I search for the English phrase in my files, I can find:

"You have no items to compare.","Sie haben keine Artikel auf der Vergleichsliste."

within the file: Mage_Catalog.csv app/design/frontend/MYTHEME/default/locale/de_DE/ basically that should already show the German sentence, right?

Additionally I added a translate.csv which seems to be not working as well.

Could this be an issue with my theme or some Magento settings?

In my app/design/frontend/MYTHEME/default/template/catalog/product/compare/sidebar.phtml I see this code:

    <?php else: ?>
    <p class="empty"><?php echo $this->__('You have no items to compare.') ?></p>
<?php endif; ?>

which looks fine to me as well!? (This file is being used - if I change something in the file, it displays immediately on the site).

up vote 27 down vote accepted

In some instances, Magento has multiple modules trying to translate the same item. Take Add to Cart for example. In Magento the modules Mage_Catalog, Mage_Checkout, Mage_Reports, Mage_Sales, Mage_Tag, Mage_Wishlist and Mage_XmlConnect all try to translate this string.

What helps in those cases is to specify which translation of which module you are trying to overrule. You can do this by adding a double colon, like so:

"Mage_Catalog::Add to Cart","Bestellen"
"Mage_Catalog::Add to Wishlist","Toevoegen aan favorieten"
  • Some parts work like you said - add the class and :: other parts seem to be hard coded into the template or additional modules - not nice :-S – Chris Nov 23 '14 at 3:15
  • great tip!! work – jruzafa Oct 18 '16 at 7:38

There could be any reason below, or a combination of many. So I write down all of them:

  1. There must be a store view for German language (System > Manage Stores);
  2. Go to System > Configuration > General / General > Locale Options. Choose German language view from Current Configuration Scope (upper left corner). Make sure that German locale is chose;
  3. Make sure that the string you want to translate is EXACTLY as it is in translate.csv. Magento is infamous for small tweaks in base texts -- punctuations, capitalizations and so on;
  4. Make sure that web server has enough privileges to read translate.csv file;
  5. Make sure that there's no precedence taking inline translation in place. Check core_translate table;
  • I checked all your points and everything seems to be fine. My first question though was: " ...within the file: Mage_Catalog.csv app/design/frontend/MYTHEME/default/locale/de_DE/ basically that should already show the German sentence, right?" – Chris Jul 15 '14 at 9:23

You should create translate.csv file inside your theme/locale/de_DE folder. There you should add this entry. & make sure your csv is comma seperated some times when we use excel or other application it doesn't make csv field comma seperated but tab separated might be that can be cause.

  • Checked as well - this was fine. It just seems as if this template won't use the files it's supposed to use. – Chris Jul 15 '14 at 13:04

Currently in the same boat, debugging translations not working. Two more suggestions which may help others on a translation quest:

  1. Make sure all cache is fully cleared.
  2. When building an extension, use the extension's data helper to load the translation: Mage::helper('my_extension')->__('String to translate');

Make sure you add your theme in the CMS:

system > config > design > translations <theme-name>

Otherwise translate.csv won't load.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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