16

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

2

5 Answers 5

30

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"
2
  • 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
    Commented Nov 23, 2014 at 3:15
  • great tip!! work
    – jruzafa
    Commented Oct 18, 2016 at 7:38
8

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;
1
  • 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
    Commented Jul 15, 2014 at 9:23
2

Make sure you add your theme in the CMS:

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

Otherwise translate.csv won't load.

1
  • 1
    Great call! This was my problem, after I'd reviewed all the above! Thanks Commented Oct 9, 2019 at 16:18
1

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.

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

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');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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