Ah, of course. Thats currently not possible, see http://open.silverstripe.com/ticket/3722
For a has_one relationship, you can work around it by overloading the getters/setters for the field.
For has_many/many_many, you could try overloading it and just returning the relations for any of the translations. A bit hacky, because it means that you still associate the objects with a translation, rather than the original:
class Product extends DataObject {
$has_many = array('Colors'=>'Color');
function Colors() {
$ids = implode(',',$this->getTranslations()->column('ID'));
return $this->getComponents('Colors', sprintf('"Color"."ProductID" IN %s', $ids));
}
}
class Color extends DataObject {
$has_one = array('Product'=>'Product');
}
You might get into trouble with the existing "ProductID = X" check generated by getComponents(), in whcih case you'd have to manipulate the query directly through getComponentsQuery(). Also note that the code doesn't have any error checking for empty sets etc.