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

TheKitMurkit
  • 505
  • 9
  • 18
Chris
  • 577
  • 3
  • 7
  • 19
  • I just tried the inline translation and that works. But as I read, this data will be stored in the database. Not bad - but if the German files are already there and I installed the German language package - why wouldn't it be used if the template seems to be implemented correctly? – Chris Jul 15 '14 at 13:05
  • I can't get it working and I don't understand why. Tried so far: http://www.geekieblog.com/2011/10/adding-a-new-language-to-magento/ http://inchoo.net/ecommerce/magento/adding-a-new-language-in-magento/ http://www.hellothemes.com/support-category/getting-started/how-to-set-up-languages-magento/ http://www.magentocommerce.com/knowledge-base/entry/changing-the-store-language But none worked. customer/account/login/ for instance stays English eventhough I use the German version. Why does that happen? Is there anything wrong with my installation? – Chris Aug 11 '14 at 08:08

5 Answers5

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"
Teja Bhagavan Kollepara
  • 3,816
  • 5
  • 32
  • 69
Giel Berkers
  • 12,237
  • 7
  • 76
  • 122
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;
Pronto
  • 3,405
  • 1
  • 15
  • 33
  • 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 09:23
2

Make sure you add your theme in the CMS:

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

Otherwise translate.csv won't load.

TonkBerlin
  • 389
  • 1
  • 12
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.

  • 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
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');
upstream
  • 229
  • 1
  • 6