1

Description of Problem

No matter what I try, I cannot get my Ubercart Catalog Block to change languages when I use the Language Switcher. You can test this behaviour for yourself at:

holistichorsecare.com/zh/products/aromadog-arf-ritis-pain-relief-1oz

Regardless of the language context (English or Chinese, "en" or "zh-hant"), the shopping cart block on the left margin of the page, under all circumstances, displays this text:

Shopping cart

There are no products in your shopping cart.

0 Items Total: HK$ 0.00

Go ahead and give it a try. Load the page and click on English or Chinese as they appear in the page header. The shopping cart block does not change languages- and I'd like it to.

The Localization Files are Installed - I Think...

I've installed the following localization strings packages using the Administration front end and they appeared to be loaded correctly.

  • ubercart-6.x-2.13.zh-hant.po
  • uc_ajax_cart-6.x-1.0.zh-hant.po

Checking out the Module Code

Looking into:

holistichorsecare.com/www/content/sites/all/modules/ubercart/uc_cart/translations/zh-hant

I see the following entry around line 1926:

msgid "There are no products in your shopping cart." msgstr "ä½ (妳)ç è³¼ç©è»è£¡æ²æä»»ä½åå."

(the garbled text is the multi-byte characters breaking up in my shell)

Looking into

holistichorsecare.com/www/content/sites/all/modules/ubercart/uc_cart/cart.module

I see the following call around line 706:

$output = '<p class="uc-cart-empty">'. t('There are no products in your shopping cart.') .'</p>';

So it appears that there is a call to t() to translate the string, but none is forthcoming from whatever system there is that serves up the alternatives.

Can someone please tell me where I need to go in the administration front end to enable localization/translation for the shopping cart block (ajax cart) in Ubercart?

I'm thinking I just missed a check box somewhere to turn on the translation, or have to tell Drupal/Ubercart that the strings in the Shopping Cart Block are to be translated, but I don't know where to go or how to do this.

P.S.: When I called i18n_get_lang() in troubleshooting code I got the right answer back (i.e. "en" or "zh-hant"), so the system knows what language context it is in.

Thank you.

1 Answer 1

0

Sorry but you CAN NOT HAVE Ubercart multilingual because the project was started on the wrong way and now the developer team have no interest/possibility/capability to rewrite a lot of code!

1
  • Hello, I paid a developer to make Ubercart multi-lingual aware. It took a month, was affordable and it works great now. Take a look: www.holistichorsecare.com
    – user34692
    Nov 18, 2014 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.