in drupal 7 with the introduction of entities there is 2 ways to translate nodes
regular i18n method and entity_translation (which is by many the most flexible way of the two and probably the predominant one down the line)

the current state of the module can't handle entity_translation
when you create a node and entity translate and enter it as block the content always stays english no matter what language the user is seeing ...

CommentFileSizeAuthor
#4 nodeblock-1323746-4.patch736 bytesplach
#3 translation.patch833 bytesrudiedirkx

Comments

maxxer’s picture

subscribe

rudiedirkx’s picture

That's because of this line:

  $lang = LANGUAGE_NONE;

which you can easily change to:

  global $language;
  $lang = $language->language;

I have no idea why that's not always the case... node_view is smart enough for that.

rudiedirkx’s picture

StatusFileSize
new833 bytes

And a patch.

plach’s picture

Status: Active » Needs review
StatusFileSize
new736 bytes

node_view() can handle this fairly easily by just defaulting to the current language. This will have no impact on core node translations. See the attached patch.

tuwebo’s picture

patch #4 looks great, it is working fine for me!

Thanks!

plach’s picture

Status: Needs review » Reviewed & tested by the community

I guess #5 means RTBC...

Johnny vd Laar’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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