Ignore:
Timestamp:
Mar 28, 2011, 3:51:43 PM (13 years ago)
Author:
plg
Message:

Language Switch:

  • display language name next to flag (and enlarge the flag box to ~400px)
  • force the links color inside the language box because the background color is

forced : on a theme like "grum dark II", the result is really awful, impossible
to read.

  • the current language is not removed from the list, this ways the list is not

reorganized depending on the current language

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/language_switch/language_switch.inc.php

    r8728 r9906  
    7171                 add_url_params( $url_starting, array('lang'=> $code) )),
    7272        'alt' => ucwords( $displayname ),
     73        'title' => substr($displayname, 0, -4), // remove [FR] or [RU]
    7374        'img' => get_root_url().'language/' . $code . '/' . $code . '.jpg',
    7475        );
    75       if ( $code !== $user['language'] )
    76         $lsw['flags'][$code] = $qlc ;
    77       else $lsw['Active'] = $qlc;
     76     
     77      $lsw['flags'][$code] = $qlc ;
     78     
     79      if ($code == $user['language'])
     80      {
     81        $lsw['Active'] = $qlc;
     82      }
    7883    }
    7984    $template->set_filename('language_flags', dirname(__FILE__) . '/flags.tpl');
Note: See TracChangeset for help on using the changeset viewer.