Hi
As the shop is in Hebrew I would like also the the countries table and the areas will be translated to Hebrew and show it in Hebrew
Where do I translate the values of the countries?
Thank you
|
Ubercart |
|
|
|
||
|
Sun, 07/27/2008 - 08:48
Hi As the shop is in Hebrew I would like also the the countries table and the areas will be translated to Hebrew and show it in Hebrew Where do I translate the values of the countries? Thank you
Re: Countries tables
Unfortunately, those country names are coming from the database and are therefore untranslatable according to the proper usage of t(). It might be possible for you to patch your install directly, though, and edit the uc_country_select() function in uc_store.module so that the options which represent country names are wrapped in t() even though they aren't string literals. If you have translation rules for them, they should still translate. <?php
Patch
Created a patch, as per Ryan's suggestion. There's no "easy" alternative to handling this problem, so for UC1 and UC2 I don't think any other approach is sensible, even if this goes slightly against Drupal "convention":
It can also be done in template.php
Country select translation on shipping and billing panes can also be done in template.php if you prefer with the code below: /**
unbelievable
I was checking to see how to deal with names, and now I see about these workarounds, I can't believe something as simple as adding the t() function usage has not been already placed in ubercart code.
Again I say: unbelievable.
There is a fix
To be fair, the problem here is not straightforward at all. There are problems with simply wrapping country names in the t() function, because they are *not* strings in the code (the intended use for that function) and you can get all sorts of issues emerging. GOOD NEWS - there is a fix awaiting testing on Drupal.org: http://drupal.org/node/782960#comment-4286192 This is finally a proper fix for this long-running issue. (Higher up in the thread is also an explanation of why this is not a simple fix.) Please review the patch there and help get it committed so this problem goes away. =) |
|