Magento – Translation not working for “please specify shipping method”

localisation

We've opened our Magento store a few weeks ago. We are located in the Netherlands and only sell items on the Dutch market, so the entire site is in Dutch. Thanks to some excellent translation packs, that was simple.

But:
I've been unable to translate the error customers get when they forget to specify the shipping method when using OneStepCheckout. The error logically shows: "Please specify shipping method." But this line isn't translated in Dutch. Inline translation doesn't work because it's apparently somewhere in Javascript. When searching Google, I only found one relevant article from 2008 which links to a bug in Magento which was solved long ago, unfortunately the link it refers to is dead.

Because there isn't a lot to find about this specific issue, it may be something specific in my setup or extensions.

I use:

  • The latest version Magento Community Edition (1.7.2.)
  • Extension: IWD OneStepCheckout
  • Template: Ultimo theme from Themeforest
  • Nothing else that might cause the problem I think

Thanks for the help,

Best Answer

I encountered this before. I think it's a magento bug. The text comes from app/code/core/Mage/Checkout/etc/jstranslator.xml:

<validate-shipping-methods-required translate="message" module="checkout">
    <message>Please specify shipping method.</message>
</validate-shipping-methods-required> 

The problem is that in the same file there is an other element with the tag validate-shipping-methods-required(as the item above) and this interferes with the translation of this text. The element is this one (2 elements lower that the first one):

<validate-shipping-methods-required translate="message" module="checkout">
    <message>Please specify payment method.</message>
</validate-shipping-methods-required> 

That should be:

<validate-payment-methods-required translate="message" module="checkout">
    <message>Please specify payment method.</message>
</validate-payment-methods-required> 

I know it's against every Magento best practice, but I modified the core file directly, (in hope that this will be fixed in the next version) and everything works now.

Related Topic