Add to cart button translation

Posts: 26
Joined: 12/18/2007
Bug Finder

on product pages you get the add to cart button. i wanted this button to be translated so i went to the localization value "Add to cart" and modified it. but the modifications didn't work on the product page (it remained the same).

so then i looked in the settings and found that the value of this button is set by this settings page:
admin/store/settings/products/edit

so how do i make it use the localization value without modifying the code. because i already found out that changing

uc_product.module line 2258
$form['submit'] = array('#type' => 'submit', '#value' => variable_get('uc_product_add_to_cart_text', t('Add to cart')), );

into

$form['submit'] = array('#type' => 'submit', '#value' => t('Add to cart'), );

does the trick too

Posts: 5618
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Unfortunately, this is a known problem in Ubercart w/ multilingual sites. For now, your fix is good. For more info, check out this post.

Posts: 26
Joined: 12/18/2007
Bug Finder

ah ok. well thx for the quick reply. untill then we'll just try to work around it then Smiling