Magento – “%s” translate into the translate.csv as e.g.. Coupon Code “%s” is not valid. Coupon code oder “%s” was applied.

There are some places in Magento, which is not so easy with the motto “Translation”,”Translation” or “Translation of %s”,”Translation of% s” translate.csv can translate into the. Occurs as a quotation in the text, it becomes more difficult, if you do not know, how it works.

This occurred for example in the checkout area or. Cart when a voucher is entered. We accompanied the voucher itself quotes, so that

“Coupon Code “%s” was applied.”,”The voucher “%s” was accepted.”
or
“Coupon Code “%s” is not valid.”,”The voucher “%s” is not valid.”

will not work. The code or. the text, of these two sites caused, incidentally comes from the file in the folder CartController.php app / code / core / Mage / Checkout / controllers.

In the case of quotes must be doubled simply, so that the correct translation should read:

“Coupon Code “”%s”” was applied.”,”The voucher “”%s”” was accepted.”
and
“Coupon Code “”%s”” is not valid.”,”The voucher “”%s”” is not valid.”

Make it work then.

More “difficult” Translations in the Addendum:

“Only registered users can write reviews. Please, <a href=””%s””>log in</a> or <a href=””%s””>register</a>”,”Only registered user can post reviews. Please <a href=””%s””>Sign up here</a> or <a href=””%s””>Register</a>”

“I accept the <a id=””onestepcheckout-toc-link”” target=””_blank”” href=””javascriptwindow.open:void(0);””>Terms and Conditions</a>”,”I have the <a id=””onestepcheckout-toc-link”” target=””_blank”” href=””javascriptwindow.open:void(0);””>Terms and Conditions</a> printed, read and agree to be bound.”

It is extremely important to make sure, that always the right quotation marks are used! Even when copying and pasting, there are problems quickly.

Used in Magento Version 1.4.1.1 and 1.5

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

3 comments on “Magento – “%s” translate into the translate.csv as e.g.. Coupon Code “%s” is not valid. Coupon code oder “%s” was applied.”

  1. Thank you for pointing, this has saved me a long search!

    Perhaps more important, the translate.csv never to be opened with a program such as Excel (I've made a habit), has crashed when saving all fonts and all translations in English were suddenly. Always use a pure text editor (zB TextMate).

  2. Valuable “Tip”. I'm also on the problem with coupon code “%s” was applied. encountered and was hoping, that ” is the solution… On the double double quotation marks I had not come by itself 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *