2

We tried to change the Add to Cart button from 'out of stock' to '4-5 business days' for out of stock products using translate inline, which was simple enough. However, although the text was changed, we also deleted the functionality of the button thereby disabling the possibility of back/pre-ordering.

Is it possible to restore the button using translate inline, and, if so, which code should we use? Our website is www.yellowbrickboardgames.com and we're using Magento 1.9.1.0.

Thank you so much for your help.

2 Answers 2

2

I always use the CSV files for translations. On my most recent project I was surprised to learn that you can put translations in one csv file regardless of what module they are from.

I suggest that you copy the CSV files across to your theme and make your changes in there.

Here is an article that does a good job of explaining where Magento gets its translations from:

http://blog.belvg.com/magento-certified-developer-exam-internationalization.html

1
  • Also worth mentioning that module specific translations can be added by adding the Module_Name:: before the text. For example "Mage_Checkout::Add to cart","Add to basket"
    – Jeroen
    Commented Mar 11, 2015 at 22:11
0

I would create/update the translate file under app/design/frontend/yourpackage/yourtheme/locale/yourlanguage/translate.csv and add the line below inside it:

"Out of stock","4-5 business days"

Please note that the "yourlanguage" folder in the path above should look like this: en_GB or fr_FR.

Also, the translation is case sensitive so make sure that the first part (the part you want to translate) matches exactly the words you want to translate.

Finally please note that this method will translate every "out of stock" displayed on your theme so you need to make sure it's what you want and it doesn't translate something that doesn't need to be translated.

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.