3 replies [Last post]
netslave's picture
Offline
Joined: 05/22/2008
Juice: 187
Was this information Helpful?

Hello guys,

I have a problem with the internationalization anbd sorting of a ubercart installation.

Following Problem:

(1) Street Address and ist not translatable! Also the other field names normally not (Street Address 1 , Street Address 2). With a small trick you can make this fields also translatable .


/** example for billing **/
foreach (element_children($form['panes']['billing']) as $key)
{
$form['panes']['billing'][$key]['#title'] = t($form['panes']['billing'][$key]['#title']);
}

(2) The other problem is, that i want to sort this fields. The Postal Code should come before the City. This was my try :


function hook_uc_cart_checkout_form(&$form)
{
$form['panes']['billing']['billing_postal_code']['#weight'] = -10;
}

bu nothing happens ;- (

Have an idea ?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Problem with i18n and Sorting

Hmm... to sort them, you'll probably have to override the theme function theme_address_pane() that is used to print out the form fields. Regarding the i18n trouble... that's a drawback of the way we made it easy for folks to switch the text on those fields. We'll be correcting this come Drupal 6.

netslave's picture
Offline
Joined: 05/22/2008
Juice: 187
Thanx

Baby, you are my hero ;- )

asak@drupal.org's picture
Offline
Joined: 10/23/2008
Juice: 67
Hey guys

This is a D5/U1 issue - which still exists in U2...

Come help at http://www.ubercart.org/forum/internationalization/10878/i18n_issues_i_d...