Home  |  Linux  | Mysql  | PHP  | XML
From:Philip Olson Date:Thu Jun  5 11:45:23 2008
Subject:cvs: docweb /templates/all/www/shared nav_languages.tpl.php
philip		Thu Jun  5 17:45:23 2008 UTC

  Modified files:              
    /docweb/templates/all/www/shared	nav_languages.tpl.php 
  Log:
  Choose a specific country flag when the language code involves many countries
  And added the Iran flag (ir) for Persian (fa) 
  
  
http://cvs.php.net/viewvc.cgi/docweb/templates/all/www/shared/nav_languages.tpl.php?r1=1.1&r2=1.2&diff_format=u
Index: docweb/templates/all/www/shared/nav_languages.tpl.php
diff -u docweb/templates/all/www/shared/nav_languages.tpl.php:1.1 docweb/templates/all/www/shared/nav_languages.tpl.php:1.2
--- docweb/templates/all/www/shared/nav_languages.tpl.php:1.1	Wed Oct 27 16:43:01 2004
+++ docweb/templates/all/www/shared/nav_languages.tpl.php	Thu Jun  5 17:45:23 2008
@@ -4,8 +4,15 @@
         echo '<a href="' . get_insite_address(NULL, 'all') . '">&docweb.common.all;</a> '."\n";
     }
     else {
+
+        // Show specific country flags when language/country codes differ
+        $alt_flags = array(
+            'fa' => 'ir',
+        );
+        $flag_code = isset($alt_flags[$code]) ? $alt_flags[$code] : $code;
+
         // @@@ TODO: translate/entity names
-        echo '<a href="' . get_insite_address(NULL, $code) . '" title="' . $name . '" ><img src="/images/flags/' . $code . '.png" alt="' . $name . '" /></a>'."\n";
+        echo '<a href="' . get_insite_address(NULL, $code) . '" title="' . $name . '" ><img src="/images/flags/' . $flag_code . '.png" alt="' . $name . '" /></a>'."\n";
     }
 }
 ?>
\ No newline at end of file


Navigate in group php.doc.web at sever news.php.net
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants