cvs: docweb /templates/all/www/shared nav_languages.tpl.php

[email protected] ("Philip Olson")
Newsgroups php.doc.web
Message-ID <cvsphilip1212687923@cvsserver>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.