Magento Not Translating Wishlist Product Name and

2019-09-15 17:44发布

问题:

I have a developmental Magento Store I'm setting up with two languages. Everything works perfect except the SideBar Wishlist and the "My Account" Wishlist displays the Spanish option no matter what. Everything switches i.e. the "My Wishlist" title header, even the email to friend box that automatically writes in "Please, enter your comments..." changes correctly. But the product name and discription remians in Spanish. I've tried this suggestion here: Wishlist don´t capture store views lenguage

Has anyone figured out how to fix this or what I might have set incorrectly?

Thanks

回答1:

I had this problem as well on Magento 1.6.2CE. - while switching store languages product names remain in default language.

On a file Wishlist\Model\Item.php arround line 319 you need to remove the line of code:

public function getProduct()
{
    $product = $this->_getData('product'); // <-- remove this line

The $product object is reloaded again with the correct store filter.



回答2:

I don't really understand the scenario, but based on your title I had came up with this. By any chance, did you manually code the text on a HTML block?

I have came across with this problem, and what I did is find the code snippets where the text is being called. There I changed it with the code below, instead of directly using the text itself. Hope that it makes sense.

<?php $this->__('Customers'); ?>