Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Problems with checkout step label translation
 
mooncat
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2007-12-11
Cambridge, UK
 

We’re having problems changing the label text for the steps in checkout/onepage. We can modify Mage_Checkout.csv to alter ‘Checkout method’ and ‘Order Review’, but trying to change ‘Billing Information’, ‘Shipping Information’ and ‘Shipping Method’ seems to have no effect. Does anyone else have this problem?

Many thanks

Simon

 
Magento Community Magento Community
Magento Community
Magento Community
 
mooncat
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2007-12-11
Cambridge, UK
 

Hmmm. There’s something strange going on. In app/code/core/Mage/Checkout/Block/Onepage/Billing.php, if I change the constructor to read translation for ‘Bill Info’ and make a new entry in Mage_Checkout.csv it works as expected! Doesn’t make sense to me. It’s as if it doesn’t like that particular translation entry. I’ve even made sure it’s the same by using copy and paste for the translation key.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mooncat
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2007-12-11
Cambridge, UK
 

Interesting again. If I change the keys ‘Billing Information’, ‘Shipping Methods’ and ‘Shipping Method’ to ‘Billing InformationZ’, ‘Shipping MethodsZ’ and ‘Shipping MethodZ’ it works correctly!

 
Magento Community Magento Community
Magento Community
Magento Community
 
matthiasg
Jr. Member
 
Total Posts:  2
Joined:  2007-12-05
Mainz, Germany
 

Seems like if you define a key/translation twice or more, Magento defaults back to the English translation.

For example, we had a translation for ‘Email Address’ both in Mage_Checkout.csv and Mage_Customer.csv. Same translation, but Magento used the value of the key, i.e. the English original - even if Mage_Checkout.csv was defined in my config.xml.

After I’ve deleted the line from one(!) of the CSV files, the German translation is displayed.

I suppose there might be a bug in the Translate model, will try to find out later ...

Edit: In app/code/core/Mage/Core/Model/Translate.php, try to comment out line 206

unset($this->_data[$key]);
. This seems to solve the problem for me, although I definitely have to do some further testing ;O) Please give feedback!
 
Magento Community Magento Community
Magento Community
Magento Community
 
mooncat
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2007-12-11
Cambridge, UK
 

Hi! Thanks for the help. I tried removing the unset() call and now it works. Seems like a bit of a hack to me, but at least it works now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
freakalis
Jr. Member
 
Total Posts:  19
Joined:  2009-01-19
 

I had the same problem.

The unset function has moved to 245 and is only run i you have set Magento to developer mode. So it shouldn’t be a problem in a production enviroment. Uncomment the unset call still does the trick though.

if (Mage::getIsDeveloperMode()) {
  
unset($this->_data[$key]);
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Jonathan_
Jr. Member
 
Total Posts:  22
Joined:  2009-07-23
 

Not working for me, is there anything else I have to do? I have removed

if (Mage::getIsDeveloperMode()) {
                            
unset($this->_data[$key]);
                        
}

clear my cache and I got the same issue…

Thanks for your help!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top