problem with [$node->language][0] I have a problem with this code in node.tpl.php

&lt;?php if (isset($node-&gt;field_image[$node-&gt;language][0])): ?&gt;
  &lt;div class="image-block"&gt;
    &lt;a href="&lt;?php print $node_url ?&gt;" title="&lt;?php print $node-&gt;field_image[$node-&gt;language][0]['title'] ?&gt;"&gt;
      &lt;?php print theme(
        'image_style',
        array(
          'style_name' =&gt; 'teaser',
          'path' =&gt; $node-&gt;field_image[$node-&gt;language][0]['uri'],
          'alt' =&gt; $node-&gt;field_image[$node-&gt;language][0]['alt'],
          'title' =&gt; $node-&gt;field_image[$node-&gt;language][0]['title'],
          'attributes' =&gt; array(),
          'getsize' =&gt; false
        )
      );?&gt;
    &lt;/a&gt;
  &lt;/div&gt;
&lt;?php endif; ?&gt;


I know above code work if language natural, but my website is bilingual.
How can i solve this problem.
You shouldn't be accessing the data directly. You should use field_get_items() instead. I also use a foreach below, as that makes your code more generally applicable. Limiting to a single image should happen at the field layer, not theme. If you really want to, you could $image = reset($images).

$images = field_get_items('node', $node, 'field_image');
foreach ($images as $image) {
  $image_render = theme('image_style', array(
    'style_name' =&gt; 'teaser',
    'path' =&gt; $image['uri'],
    'alt' =&gt; $image['alt'],
    'title' =&gt; $image['title'],
    'attributes' =&gt; array(),
    'getsize' =&gt; false)
  );

  $link = l($image_render, $node_url, array('title' =&gt; $image['title'], 'html' =&gt; TRUE));
  print '&lt;div class = "image-block"&gt;' . $link . '&lt;/div&gt;';
}