###### PATCHTAG00 ####################################################
###      Lithuanian/Lietuviškai
###      => ve <ve@hardcore.lt>
###### PATCHTAG10 ####################################################
  &lithuanian
###### PATCHTAG20 ####################################################
  'lithuanian'       => \&lithuanian, 
  'lietuviškai'        => \&lithuanian,
###### PATCHTAG30 ####################################################
# Lithuanian/lietuviškai
   'lithuanian' =>
   "  <HR NOSHADE>
    Paruošė ir į lietuvių kalbą išvertė
    <NOBR><A HREF=\"http://www.hardcore.lt\">ve</A>
  <A HREF=\"mailto:ve\@hardcore.lt\">
  &lt;ve\@hardcore.lt&gt;</A></NOBR>",
# the lithuanian string means: "Prepared for languages and translated to lithuanian by"
###### PATCHTAG40 ####################################################
$credits::LOCALE{'lietuviškai'}=$credits::LOCALE{'lithuanian'};
###### PATCHTAG50 ####################################################
# Lithuanian

sub lithuanian
{
  my $string = shift;
return "" unless defined $string;
  my(%translations,%month,%wday);

  my($i,$j);
  my(@dollar,@quux,@foo);

  
  # regexp => replacement string NOTE does not use autovars $1,$2...
  # charset=iso-2022-jp

  %translations =
  (  
     'charset=iso-8859-1'                     => 'charset=windows-1257',
     'Maximal 5 Minute Incoming Traffic'      => 'Maksimalus 5 minučių įeinantis srautas',
     'Maximal 5 Minute Outgoing Traffic'      => 'Maksimalus 5 minučių išeinantis srautas',
     'the device'                             => 'įrenginys',
     'The statistics were last updated(.*)'   => 'Statistika atnaujinta$1',
     ' Average\)</B><BR>'                     => ' vidurkis)</B><BR>',
     '<TD ALIGN=right><SMALL>Average(.*)'     => '<TD ALIGN=right><SMALL>vid$1',
     '<TD ALIGN=right><SMALL>Max(.*)'         => '<TD ALIGN=right><SMALL>max$1',
     '<TD ALIGN=right><SMALL>Current(.*)'     => '<TD ALIGN=right><SMALL>dabar$1',
     'version'                                => 'versija',
     '<B>`Daily\' Graph \((.*) Minute'        => '<B>\'dienos\' grafikas ($1 min.',
     '<B>`Weekly\' Graph \(30 Minute'         => '<B>\'savaitės\' grafikas (30 min.' ,
     '<B>`Monthly\' Graph \(2 Hour'           => '<B>\'mėnesio\' grafikas (2 val.',
     '<B>`Yearly\' Graph \(1 Day'             => '<B>\'metų\' grafikas (1 d.', 
     'Incoming Traffic in (\S+) per Second'   => 'Įeinantis srautas, $1 per sekundę',
     'Outgoing Traffic in (\S+) per Second'   => 'Išeinantis srautas i $1 per sekundę',
     'at which time (.*) had been up for(.*)' => '$1 veikia jau $2',
     # '([kMG]?)([bB])/s'                 => '\$1\$2/s',
     # '([kMG]?)([bB])/min'              => '\$1\$2/min',
     # '([kMG]?)([bB])/h'                       => '$1$2/h',
     'Bits'                                => 'bitai',
     'Bytes'                              => 'baitai',
     '&nbsp;In:</FONT>'                      => '&nbsp;į:</FONT>',
     '&nbsp;Out:</FONT>'                     => '&nbsp;iš:</FONT>',
     '&nbsp;Percentage</FONT>'               => '&nbsp;procentai:</FONT>',
     'Ported to OpenVMS Alpha by'             => 'Perkėlė į OpenVMS Alpha:', 
     'Ported to WindowsNT by'                 => 'Perkėlė į WindowsNT:',
     'and'                                    => 'ir',
     '^GREEN'                                 => 'ŽALIA ',
     'BLUE'                                   => 'MĖLYNA ',
     'DARK GREEN'                             => 'TAMSIAI ŽALIA ',
     'MAGENTA'                                => 'RAUDONA ',
     'AMBER'                                  => 'GINTARINĖ '
  );

# maybe expansions with replacement of whitespace would be more appropriate

foreach $i (keys %translations)
{  
  my $trans = $translations{$i};
  $trans =~ s/\|/\|/;  
  return $string if eval " \$string =~ s|\${i}|${trans}| ";
};

%wday = 
    (
      'Sunday'    => 'sekmadienį',       'Sun' => 'Sek',
      'Monday'    => 'pirmadienį',       'Mon' => 'Pir',
      'Tuesday'   => 'antradienį',       'Tue' => 'Ant',
      'Wednesday' => 'trečiadienį',      'Wed' => 'Tre',
      'Thursday'  => 'ketvirtadienį',    'Thu' => 'Ket',
      'Friday'    => 'penktadienį',      'Fri' => 'Pen',
      'Saturday'  => 'šeštadienį',       'Sat' => 'Šeš' 

    );

%month = 
    (
      'January'   => 'sausio',    'February'  => 'vasario' ,    'March'     => 'kovo',
      'Jan'       => 'Sau',       'Feb'       => 'Vas',         'Mar'       => 'Kov',
      'April'     => 'balandžio', 'May'       => 'gegužės',     'June'      => 'birželio', 
      'Apr'       => 'Bal',       'May'       => 'Geg',         'Jun'       => 'Bir',
      'July'      => 'liepos',    'August'    => 'rugpjūčio',   'September' => 'rugsėjo', 
      'Jul'       => 'Lie',       'Aug'       => 'Rgp',         'Sep'       => 'Rgs', 
      'October'   => 'spalio',    'November'  => 'lapkričio',   'December'  => 'gruodžio', 
      'Oct'       => 'Spa',       'Nov'       => 'Lap',         'Dec'       => 'Gru' 
    );

  @foo=($string=~/(\S+),\s+(\S+)\s+(\S+)(.*)/);
  if($foo[0] && $wday{$foo[0]} && $foo[2] && $month{$foo[2]} )
    {
	if($foo[3]=~(/(.*)at(.*)/))
      { 
        @quux=split(/at/,$foo[3]);
        $foo[3]=$quux[1].", ".$quux[0]; 
      };
      return "$foo[3] $month{$foo[2]} $foo[1], $wday{$foo[0]}" ;
    };

#
# handle two different time/date formats:  
# return "$wday, $mday $month ".($year+1900)." at $hour:$min";
# return "$wday, $mday $month ".($year+1900)." $hour:$min:$sec GMT";
#

# handle nontranslated strings which ought to be translated
# print STDERR "$_\n" or print DEBUG "not translated $_";
# but then again we might not want/need to translate all strings
  
  return $string;

  };
