dokuwiki plugin-translations flags

This is the translations plugin used on this site with flags instead of two letter ISO codes. See top right corner for the flags 8-)

Interface  Configuration

Usage Example

Just unzip this file in /lib/plugins folder.

Server Side Code

//syntax.php function was modified as follows
    function _buildTransLink($lng,$idpart){
        global $conf;
        global $saved_conf;
            $link = ':'.$this->tns.$lng.':'.$idpart;
            $name = $lng;
            $link = ':'.$this->tns.$idpart;
              $name = $conf['lang'];
            } else {
              $name = $conf['lang_before_translation'];
        // BOF: add flags; ******************************
        if(file_exists(DOKU_PLUGIN.'translation/flags/langnames.php') &&
            $flag['title'] = $langname[$name];
            $flag['src'] = DOKU_URL.'lib/plugins/translation/flags/'.$langflag[$name];
            return html_wikilink($link,$flag);
        // EOF: add flags;*********************************
        return html_wikilink($link,$name);

Client Side Code

None needed

Candidate Code Suggestions

If you'd like to use dropdown, it may be better to do it as suckerfish css ul list (like the top menu on this site)

The pluign has been uodated, will a new version of this enhancement also be issued>