From cd3dd647fe9708525bbd1793cce87780d32792a1 Mon Sep 17 00:00:00 2001
From: Christian Roy <christian@roy.name>
Date: Sun, 20 Mar 2011 16:31:44 -0400
Subject: [PATCH] Issue #822582 by roychri: Added support for the print module.

---
 i18nlogo.module |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/i18nlogo.module b/i18nlogo.module
index d4bec5b..d40d732 100644
--- a/i18nlogo.module
+++ b/i18nlogo.module
@@ -133,3 +133,18 @@ function i18nlogo_preprocess_page(&$variables) {
     $variables['logo'] = file_create_url(variable_get('i18nlogo_path_'. $lang, NULL));
   }
 }
+
+
+function i18nlogo_theme_registry_alter(&$theme_registry) {
+  $theme_registry['print_page']['preprocess functions'][] = 'i18nlogo_preprocess_print_page';
+}
+
+function i18nlogo_preprocess_print_page(&$variables, $theme) {
+  global $language;
+  $lang = $language->language;
+
+  if (variable_get('i18nlogo_path_'. $lang, NULL)) {
+    $logo_url = file_create_url(variable_get('i18nlogo_path_'. $lang, NULL));
+    $variables['print']['logo'] = "<img class='print-logo' src='". check_url($logo_url) ."' alt='$site_name' id='logo' />\n";
+  }
+}
\ No newline at end of file
-- 
1.7.1

