Writing robust code that uses fields, in Drupal 7
In Drupal 7, the direct access to entity fields (CCK in d6) is different. In Drupal 6 you write:
<span style="color: #000000"><span style="color: #0000BB"><?php<br>$field_val </span><span style="color: #007700">= </span><span style="color: #0000BB">$node</span><span style="color: #007700">-></span><span style="color: #0000BB">field_yourfield</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">][</span><span style="color: #DD0000">'value'</span><span style="color: #007700">];<br></span><span style="color: #0000BB">?></span></span>
in Drupal 7 you have to write:
<span style="color: #000000"><span style="color: #0000BB"><?php<br>$field_val </span><span style="color: #007700">= </span><span style="color: #0000BB">$node</span><span style="color: #007700">-></span><span style="color: #0000BB">field_yourfield</span><span style="color: #007700">[</span><span style="color: #0000BB">LANGUAGE_NONE</span><span style="color: #007700">][</span><span style="color: #0000BB">0</span><span style="color: #007700">][</span><span style="color: #DD0000">'value'</span><span style="color: #007700">];<br></span><span style="color: #0000BB">?></span></span>
(this is a way suggested by core docs).
So, we have different languages here now.
I haven’t built any d7 multilanguage websites yet, so I don’t know if that approach makes it really easy to create language-aware code for i18n websites (I hope it does!), but for regular single language websites this approach just adds some headaches to the developers.