Field language - Multi language I have a node in Dutch and I want to get the field in this language.
When I do:

$node-&gt;field_name[$node-&gt;language][0]['value'];


I get the error:

Undefined index: nl


So I try:

$node-&gt;field_name[$node-&gt;language]['nl']['value'];


But that doesn't work. What am I doing wrong?

Edit:

I already figured it out:


  $language = field_language('node', $node, 'field_yourfield');


This gave me the language of the field and it was 'und' and not 'nl' as I thought it would be. The language of the node can be different then of the field. Learnt a lot about i18 &amp; Drupal :)
I use a function from this blog post to retrieve the fields value, it's quite handy as it allows you to parse the different values of the field (also it handles value or nid).
Drupal 7 tip : Get field values from entity objects like nodes, users, taxonomy...

Regarding the und, I'm not very sure why is this happening, I saw this issue: Field display languages are cached before locale has changed field language, but I have to wrap my head against this.