Trace: » patch_multilingual

    --- dokuwiki-2005-09-22/inc/template.php	2005-10-21 13:43:58.000000000 +0200
    +++ dokuwiki/inc/template.php	2005-11-12 11:35:00.000000000 +0100
    @@ -248,6 +248,28 @@ function tpl_link($url,$name,$more=''){
     }
     
     /**
    + * Print links to alternate language pages
    + */
    +function tpl_lang_links($pagename){
    +  global $conf;
    +  $path = explode(':', $pagename);
    +  $lang = $path[0];
    +  if (in_array($lang, $conf['available_languages'])) {
    +    foreach ($conf['available_languages'] as $l) {
    +      if ($l != $lang) {
    +        $path[0] = $l;
    +        $new_id = implode(':', $path);
    +        if (@file_exists(wikiFN($new_id))) {
    +          print "<div class=\"pagename\">[[";
    +          tpl_link(wl($new_id), $l);
    +          print "]]</div>\n";
    +        }
    +      }
    +    }
    +  }
    +}
    +
    +/**
      * Prints a link to a WikiPage
      *
      * Wrapper around html_wikilink
    --- dokuwiki-2005-09-22/lib/tpl/sidebar/main.php	2005-09-20 14:19:56.000000000 +0200
    +++ dokuwiki/lib/tpl/sidebar/main.php	2005-11-07 21:25:00.000000000 +0100
    @@ -71,6 +71,7 @@ include(dirname(__FILE__).'/sidebar.php'
           <div class="pagename">
             [[<?php tpl_link(wl($ID,'do=backlink'),$ID)?>]]
           </div>
    +      <?php tpl_lang_links($ID)?>
         </div>
     
         <?php /*old includehook*/ @include(dirname(__FILE__).'/header.html')?>
     
    Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki