WxSim Online Forecast Display language translation

hi, it was already a long time ago I made this, see here the whole changed wdsoft.txt. Now I see I changed more, not so strange because it took me some evenings. when I have more time, I think I would do it different: translate after all the calculations are done.
But as I told you I am not the programmer, I just like to show the forecast in Dutch.

regards,

gerard

<?php require("config.php"); # CREDIT - DO NOT REMOVE WITHOUT PERMISSION # WX-SIM Online Forecast Display # VERSION 1.16 # Author: Jordan Gerth # Last modified: 01/05/2007 # Dutch translation by Gerard van 't Klooster # last modified 03/21/2007 # Documentation: http://www.wiscwx.com/jordan/wsofd/index.html # If you find this script useful, please consider a donation. ##################################### ?> <?php $ptf = @fopen( $slplaintxt, "r" ) or die("Error opening the plain text forecast. It may not exist or does not have read permissions."); $wdt = @fopen( $slwxtypdat, "r" ) or die("Error opening the weather type file. It may not exist or does not have read permissions."); $prc = @fopen( $slprecipam, "r" ) or die("Error opening the fallen precip file. It may not exist or does not have read permissions."); while (!feof($ptf)) { $tfc .= fgets($ptf, 1024); } fclose($ptf); $txtforecast = str_replace("\r", "\n", str_replace("\r\n", "\n", $tfc)); $header = substr($txtforecast, 0, strpos($txtforecast, "\n ")); $header = str_replace( 'WXSIM text forecast for Doornenburg, initialized at', 'WXSIM tekst voorspelling voor Doornenburg weerstation, gemaakt op', $header); $cstrst = substr($txtforecast, strpos($txtforecast, "__\n \n ") + 6); $endtxt = strpos($cstrst, "\n * T"); $cstbdy = substr($cstrst, 0, $endtxt - 2); if ($endtxt !== false) { $footer = substr($cstrst, $endtxt + 2); } else { $footer = "Deze voorspelling is gemaakt met plaatselijke informatie en kan afwijken van de werkelijkheid."; } $castpd = explode("\n \n ", $cstbdy); while (!feof($wdt)) { $wxls .= fgets($wdt, 1024); } fclose($wdt); $eachtype = explode("\n", $wxls); for ($j=0; $j<count($eachtype); $j++) { $oneline = explode("!", $eachtype[$j]); $wxtype[$j] = $oneline[0]; if (strlen($oneline[0]) < 2) { $oneline[0] = " "; } if (strlen($oneline[1]) < 2) { $oneline[1] = "na"; } $wxfldy[$j] = $oneline[1]; if (strlen($oneline[2]) < 2) { $oneline[2] = "na"; } $wxflnt[$j] = $oneline[2]; $wxflwd[$j] = $oneline[3]; } while (!feof($prc)) { $amln .= fgets($prc, 1024); } fclose($prc); $eachamnt = explode("\n", $amln); for ($p=0; $p<count($eachamnt); $p++) { $pamount = explode("!", $eachamnt[$p]); $pamfind[$p] = $pamount[0]; $pamshow[$p] = $pamount[1]; } $kcounter = 0; for ($k=0; $k 4) { if ($hghpos === false) { $maxmin = substr($pdverb, $lowpos + 10, strpos($pdverb, ', maar ', $lowpos) - $lowpos - 10); $fllpos = strpos($pdverb, 'temperatuur stijgt'); if ($fllpos !== false) { $trenda = "\n".'Rising'; } } else { $maxmin = substr($pdverb, $hghpos + 9, strpos($pdverb, ', maar ', $hghpos) - $hghpos - 9); $fllpos = strpos($pdverb, 'temperatuur daalt'); if ($fllpos !== false) { $trenda = "\n".'Falling'; } } } $pcppos = strpos($pdverb, 'Kans op neerslag '); if ($pcppos === false) { # hier zit nog ergens een grote fout $percntg = 0; $pladd = ""; } else { $percntg = str_replace("bijna 100", "100", str_replace("minder dan", "<", substr($pdverb, $pcppos + 17, strpos($pdverb, 'procent', $pcppos) - $pcppos - 17))); #dmprca = count($pamfind); #$ppnum = 0; #while ($ppnum < $dmprca) { # $pppos = strpos($lwrpdvb, strtolower($pamfind[$ppnum])); #if ($pppos === false) { # $ppnum++; # } else { # break; # } #} # $pladd = ' '.$pamshow[$ppnum].''; # if (strlen($pladd) < 11) { # $pladd = ""; # } # } else { # $pladd = ""; #} } $lkpos = strpos($lwrpdvb, "waarschijnlijk"); $chpos = strpos($lwrpdvb, "kans op"); $dmwxty = count($wxtype); $wxnum = 0; while ($wxnum < $dmwxty) { $wxpos = strpos($lwrpdvb, strtolower($wxtype[$wxnum])); if ($wxpos === false) { $wxnum++; } else { break; } } $cellwidth = $imgwidth + 10; $daytitle[$k]="\n"; $daytitle[$k].=''; $daytitle[$k].=$pdname; $daytitle[$k].=''; $daypictu[$k]="\n"; $daypictu[$k].=''; if ($daypd == '0') { $daypictu[$k].=''.$wxflwd[$wxnum].''; } else { $daypictu[$k].=''.$wxflwd[$wxnum].''; }; $daypictu[$k].=''; if ($lkpos !== false) { $dayverbi[$k]=$wxflwd[$wxnum].' waarschijnlijk'; } elseif ($chpos !== false) { $dayverbi[$k]='Kans op '.$wxflwd[$wxnum]; } else { $dayverbi[$k]=$wxflwd[$wxnum]; } $daytempr[$k]="\n"; if ($daypd == '0') { $daytempr[$k].=''; } else { $daytempr[$k].=''; }; $daytempr[$k].=''; $daytempr[$k].=$maxmin.'°'.$trenda; $daytempr[$k].=''; $dayprecp[$k]="\n"; $dayprecp[$k].=''; if ($percntg >= $boldpcp) { $dayprecp[$k].=''; } $dayprecp[$k].=$percntg.'%'; if ($percntg >= $boldpcp) { $dayprecp[$k].=''; } $dayprecp[$k].=$pladd; $dayprecp[$k].=''; $dayreman[$k]="\n"; $dayreman[$k].=''; $dayreman[$k].=$pdverb; $dayreman[$k].=''; $kcounter = $k; } if ($horizmax > $kcounter) { $horizmax = $kcounter; } $htbwidth = ($horizmax * (($imgwidth + 10) + 2)) + 2; $vrtwidth = (($imgwidth + 10) * 4) + 12 + $verbiwid; ?>