cloudy cloudy

Author Topic: WxSim Online Forecast Display language translation  (Read 35652 times)

0 Members and 1 Guest are viewing this topic.

Offline doornenburgweer

  • Posts: 309
  • Intel D945SGLF 1 G, XP, VantagePro 2
  • Doornenburg, The Netherlands
    • Doornenburg weer
Re: WxSim Online Forecast Display language translation
« Reply #15 on: March 24, 2007, 07:36:52 AM »
yes that is correct not yet for 1.151 because other images are used (I believe), so have to find that part out. maybe this weekend, or later next week.

regards,

gerard

Offline jwwd

  • WML testers
  • Posts: 3,708
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: WxSim Online Forecast Display language translation
« Reply #16 on: March 24, 2007, 08:17:40 AM »
Hi Gerard

Thanks for all your help - you really do a great job.

Offline doornenburgweer

  • Posts: 309
  • Intel D945SGLF 1 G, XP, VantagePro 2
  • Doornenburg, The Netherlands
    • Doornenburg weer
Re: WxSim Online Forecast Display language translation
« Reply #17 on: March 24, 2007, 08:40:48 AM »
and see here a better way, when you grow older life can be simpler:

just change the string in the vertical.php file, so no problemes with  the string lengths:

just a start, have to play with the kids now:

see here a modified vertical.php file for 1.5.1

have to change the day names, but that will be in the middle of this night. or earlier or???????

gerard


<h3 style="font-family: <? echo $fontface; ?>;"><? echo $header; ?></h3>
<table width="<? echo $vrtwidth; ?>" cellpadding="2" cellspacing="2" border="<? echo $brdrsize; ?>" bordercolor="<? echo $brdrcolr; ?>">
<?php
$torpos1 = strpos($castpd[0], "tornado");
$torpos2 = strpos($castpd[1], "tornado");
if ($torpos1 !== false && $torpos2 !== false) {
echo '<tr><td colspan="5" bgcolor="#ffff00">'."\n";
echo '<font style="font-family: '.$fontface.';"><b>';
echo 'A severe thunderstorm outbreak is likely in the next 24 hours.  Tornadoes are a threat.';
echo "\n".'</b></font></td></tr>';
}
$r = 0;
while ($r < count($daytitle)) {
echo "\n";
echo '<tr>';
echo $daytitle[$r];
echo $daypictu[$r];
echo $daytempr[$r];
echo $dayprecp[$r];
# translation
$dayreman = str_replace('Cloudy in the morning', 'Bewolkt in de morgen', $dayreman);
$dayreman = str_replace('becoming', 'overgaand in ', $dayreman);
$dayreman = str_replace('dense overcast', 'dichte bewolking', $dayreman);
$dayreman = str_replace('then', 'dan', $dayreman);
$dayreman = str_replace('the', 'de', $dayreman);
$dayreman = str_replace('afternoon', 'middag', $dayreman);
$dayreman = str_replace('cloudy', 'bewolkt', $dayreman);
$dayreman = str_replace('Patchy', 'Gedeeltelijk', $dayreman);
$dayreman = str_replace('slight', 'kleine', $dayreman);
$dayreman = str_replace('light', 'lichte', $dayreman);
$dayreman = str_replace('fog', 'mist', $dayreman);
$dayreman = str_replace('Partly', 'Gedeeltelijk', $dayreman);
$dayreman = str_replace('to', 'tot', $dayreman);
$dayreman = str_replace('gusting', 'windvlagen', $dayreman);
$dayreman = str_replace('mostly', 'overwegend', $dayreman);
$dayreman = str_replace('after', 'na', $dayreman);
$dayreman = str_replace('midnight', 'middernacht', $dayreman);
$dayreman = str_replace('morning', 'morgen', $dayreman);
$dayreman = str_replace('Mostly', 'Overwegend', $dayreman);
$dayreman = str_replace('partly', 'gedeeltelijk', $dayreman);
$dayreman = str_replace('Light', 'Lichte', $dayreman);
$dayreman = str_replace('moderate', 'matige', $dayreman);
$dayreman = str_replace('evening', 'avond', $dayreman);
$dayreman = str_replace('Dense', 'Dichte', $dayreman);
$dayreman = str_replace('overcast', 'bewolking', $dayreman);
$dayreman = str_replace('Moderate', 'Matige', $dayreman);
$dayreman = str_replace('dense', 'dichte', $dayreman);
$dayreman = str_replace('sunny', 'zonnig', $dayreman);
$dayreman = str_replace('Rain likely', 'Grote kans op regen', $dayreman);
$dayreman = str_replace('rain', 'regen', $dayreman);
$dayreman = str_replace('A', 'Een', $dayreman);
$dayreman = str_replace('chance of', 'kans op', $dayreman);
$dayreman = str_replace('High', 'Maximum:', $dayreman);
$dayreman = str_replace('Low', 'Minimum :', $dayreman);
$dayreman = str_replace('but', 'maar', $dayreman);
$dayreman = str_replace('temperatures falling', 'temperatuur daalt', $dayreman);
$dayreman = str_replace('temperatures rising', 'temperatuur stijgt', $dayreman);
$dayreman = str_replace('north', 'noord', $dayreman);
$dayreman = str_replace('nordeast', 'noordoost', $dayreman);
$dayreman = str_replace('east-', 'oost-', $dayreman);
$dayreman = str_replace('down ', 'daalt ', $dayreman);
$dayreman = str_replace('or ', 'of ', $dayreman);
$dayreman = str_replace('east ', 'oost ', $dayreman);
$dayreman = str_replace('southeast', 'zuidoost', $dayreman);
$dayreman = str_replace('southwest', 'zuidwest', $dayreman);
$dayreman = str_replace('south ', 'zuid ', $dayreman);
$dayreman = str_replace('south-', 'zuid-', $dayreman);
$dayreman = str_replace('around', 'rond', $dayreman);
$dayreman = str_replace('kph', 'km/uur', $dayreman);
$dayreman = str_replace('Chance of precipitation', 'Kans op neerslag', $dayreman);
$dayreman = str_replace('near', 'bijna', $dayreman);
$dayreman = str_replace('percent', 'procent', $dayreman);
$dayreman = str_replace('less than', 'minder dan', $dayreman);
$dayreman = str_replace('snow', 'sneeuw', $dayreman);
$dayreman = str_replace('Precipitation (liquid equivalent)', 'Neerslag (gesmolten)', $dayreman);
$dayreman = str_replace('between', 'tussen', $dayreman);
$dayreman = str_replace('and', 'en', $dayreman);
$dayreman = str_replace('Precipitation', 'Neerslag', $dayreman);
$dayreman = str_replace('accumulation expected', 'ophoping verwacht', $dayreman);
$dayreman = str_replace('Little', 'Weinig', $dayreman);
$dayreman = str_replace('no ', 'geen ', $dayreman);
$dayreman = str_replace('snow ', 'sneeuw ', $dayreman);
$dayreman = str_replace('Snow accumulation', 'Sneeuw ophoping ', $dayreman);
$dayreman = str_replace('about', 'ongeveer', $dayreman);
$dayreman = str_replace('one', '1', $dayreman);
$dayreman = str_replace('overgaen', 'overgaand', $dayreman);
$dayreman = str_replace('soudoost', 'zuidoost', $dayreman);
$dayreman = str_replace('showery of intermittent', 'afwisselend droog met buien', $dayreman);
$dayreman = str_replace('No ', 'Geen ', $dayreman);
$dayreman = str_replace('Fair ', 'Bijna geen bewolking ', $dayreman);
$dayreman = str_replace('Cloudy', 'Bewolkt', $dayreman);
$dayreman = str_replace('calm', 'kalm', $dayreman);
$dayreman = str_replace('Clear', 'Helder', $dayreman);
$dayreman = str_replace('clear', 'helder', $dayreman);
$dayreman = str_replace('Sunny', 'Zonnig', $dayreman);
$dayreman = str_replace('dan a', 'dan een', $dayreman);
$dayreman = str_replace('ice', 'ijs', $dayreman);
$dayreman = str_replace('freezing', 'bevriezende', $dayreman);
$dayreman = str_replace('sleet', 'natte sneeuw', $dayreman);
$dayreman = str_replace('a mix of', 'een mix van', $dayreman);
$dayreman = str_replace('if any', 'tot geen', $dayreman);
$dayreman = str_replace('on ground', 'op de grond', $dayreman);
$dayreman = str_replace('patchy', 'gedeeltelijk', $dayreman);
$dayreman = str_replace('Thunderstotrms likely, some possibly severe.', 'Kans op (zware) onweersbuien.', $dayreman);
$dayreman = str_replace('Some thunder possible.', 'Kans op onweer. ', $dayreman);
$dayreman = str_replace('Some thunderstotrms likely', 'Kans op onweersbuien ', $dayreman);

echo $dayreman[$r];
echo '</tr>';
echo "\n";
$r++;
}
?>
</table>
<h4 style="font-family: <? echo $fontface; ?>;"><? echo $footer; ?></h4>


Offline doornenburgweer

  • Posts: 309
  • Intel D945SGLF 1 G, XP, VantagePro 2
  • Doornenburg, The Netherlands
    • Doornenburg weer
Re: WxSim Online Forecast Display language translation
« Reply #18 on: March 24, 2007, 09:02:02 AM »
and this time no change in wdsoft file or other files just in the vertical.php

see example:

http://www.doornenburgweer.nl/scripts2/example2.php

Offline jwwd

  • WML testers
  • Posts: 3,708
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: WxSim Online Forecast Display language translation
« Reply #19 on: March 24, 2007, 09:26:16 AM »
Hi Gerard

Wow you are great.

Would you like to post the files that need to be changed for different language?

Im a little confused about which files to change - is it wsofd.php, wxtypedata.txt and vertical.php ?

Thank you very much for your help.

Offline doornenburgweer

  • Posts: 309
  • Intel D945SGLF 1 G, XP, VantagePro 2
  • Doornenburg, The Netherlands
    • Doornenburg weer
Re: WxSim Online Forecast Display language translation
« Reply #20 on: March 24, 2007, 09:28:31 AM »
from now just vertical.php and leave the rest how Jordan made it.

gerard

Offline wiscwxtech

  • Posts: 117
  • Wisconsin, USA
Re: WxSim Online Forecast Display language translation
« Reply #21 on: March 24, 2007, 05:35:57 PM »
Wow!  I am truly impressed by this community.

Jordan