Yeah im still looking for that total solution.
Anyhows, remember you also have to address the cart. If someone switches language while having a product in the cart i will not be replaced by its translation node.
Probaply will look something like this
/*
* Replace products in cart with current language
*/
function uc_boumy_cart_item($op, &$item) {
switch ($op) {
case 'load':
global $language;
$node = node_load($item->nid);
$translations = translation_node_get_translations($node->tnid);
if($translations[$language->language]){
$item->nid = $translations[$language->language]->nid;
$item->title = $translations[$language->language]->title;
}
break;
}
}