I don't see anything about translation.
My website uses i18n.
Content type B as an entityref field pointing to content type A.
Content type A and content type B are multilingual.
I first translate a content type A node. Then I translate content type B node.

I have node A1, with translation = node A1t
I create node B1, pointing to A1.
I translate node B1. The select list for entityref shows only nodes of current language, that's fine. But node A1t is not selected.
How can I do to get by default the A1t selected?
Is there a configuration I'm missing?

Comments

FiNeX’s picture

Unfortunatly it looks like entity reference is not yet i18n aware. If you need node reference with i18n you should stay with D6.

colan’s picture

Title: Translation » Trouble referring to translated nodes
Status: Active » Fixed

For D7, you may want to try field translation instead of node translation.

sahuni’s picture

I had a look (and a try) to entity translation, but I think we (the module and me) are not ready for that.
I'll try that on a new website in D7, but not when migrating a complex website from D6 to D7. Now internationalization works well in D6 and I don't want to play with it.
I think I can do it with references module and I'll continue my test in that way. If no success, I'll leave that upgrade for some months until things are more clear.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

FiNeX’s picture

Status: Closed (fixed) » Active

@colan: using entity translation is not an option now: it is still under heavy development and many modules still doesn't support it.

benjifisher’s picture

Status: Active » Needs review

This works for my site. Maybe a similar approach will work for yours. Set up a chain of Relationships (using the "Advanced" settings in Views)

B1t -> B1 -> A1 -> A1t

The options you can use the set up the references are

Content translation: Source translation
Entity Reference: Referenced Entity
Content translation: Translations

(in that order). The last one has the default option "Current language," which works for me; if you need the view to select the same language as B1t, then you may need to do something different.

I am still working on this. I think (but have not tested yet) that when you translate a node, the entity references are copied over. If so, then you should be able to link B1t directly to A1.

devad’s picture

Issue summary: View changes
Status: Needs review » Closed (works as designed)

@sahuni
You need contrib module Internationalization contributions. "Synchronize Entity reference" sub-module (i18n_entityreference) has support for this.

sahuni’s picture

Thanks, I'll try that during winter and report