Discussions

I cannot translate Price label

Hi,

i cannot translate price label. Any clues?

Posted: Oct 12, 2011

Comments

rfay Randy Fay on October 12, 2011

I think you'll want [Entity Translation](http://drupal.org/project/entity_translation) (read the project page there, which has a pointer to an [early article](http://randyfay.com/node/88) and Gabor's excellent articles).

See [this issue](http://drupal.org/node/1030066) which says that the i18n_field module, a part of [i18n](http://drupal.org/project/i18n) solves the label problem. If it doesn't please reopen that issue.

Najtsirk on October 13, 2011

These solutions does not solve the problem. Still getting 'Price' in my price label, 'Total order' in my total order label and 'items' in number of items in my shoping cart.

The only thing taht helped was to wrap

$components['commerce_price_formatted_amount'] = array(
'title' => check_plain($instance['label']),
'price' => $item,
'weight' => $weight + 1,
);

with t() functions, like that:
$components['commerce_price_formatted_amount'] = array(
'title' => check_plain(t($instance['label'])),
'price' => $item,
'weight' => $weight + 1,
);