Index: nodeasblock.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodeasblock/nodeasblock.module,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 nodeasblock.module
--- nodeasblock.module	10 Nov 2006 21:56:53 -0000	1.3.2.1
+++ nodeasblock.module	9 Feb 2007 09:15:02 -0000
@@ -77,12 +77,36 @@
     // variable_set('nodeblock_block_items', $edit['items']);
   }
   else if ($op == 'view') {
-    if ($node = node_load($delta)) {
+    if ($node = nodeasblock_translate(node_load($delta))) {
       return theme('nodeasblock', $node);
     }
   }
 } 
-   
+
+/**
+ * Translate nodes on the fly
+ * 
+ * This works with i18n module if enabled. Should have no impact otherwise
+ * 
+ * @param $node
+ *   Node to check for language and translations
+ * @return
+ *   Original node if it has no language or language is current one
+ *   Translated node if exists
+ *   Nothing if node is in a different language and has no translation
+ */
+function nodeasblock_translate($node) {
+  global $locale;
+ 
+  if ($node && $node->language && $node->language != $locale) {
+    if (isset($node->translation[$locale])) {
+      return node_load($node->translation[$locale]->nid);
+    }
+  } else {
+    return $node;
+  }
+}
+ 
 /*** Themeing ***/
 
 function theme_nodeasblock($node) {
