Witam, mam taki skrypt jak mam go poustawiać aby całość z tego XML była po Polsku? głownie chodzi mi o te linijki:
$xml = simplexml_load_file('http://www.google.com/ig/api?weather=jaworzno&oe=utf-8');
$information = $xml->xpath("/xml_api_reply/weather/forecast_information");
$current = $xml->xpath("/xml_api_reply/weather/current_conditions");
$forecast_list = $xml->xpath("/xml_api_reply/weather/forecast_conditions");
<?
$xml = simplexml_load_file('http://www.google.com/ig/api?weather=jaworzno&oe=utf-8');
$information = $xml->xpath("/xml_api_reply/weather/forecast_information");
$current = $xml->xpath("/xml_api_reply/weather/current_conditions");
$forecast_list = $xml->xpath("/xml_api_reply/weather/forecast_conditions");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<title>Pogoda Jaworzno</title>
</head>
<body>
<h1>
<?= print $information[0]->city['data']; ?></h1>
<h2>Pogoda na dzis:</h2>
<div class="weather">
<img src="<?php
$pattern[0] = '/ig/images/weather/';
$pattern[1] = '.gif';
$replacement[0] = 'http://ssl.gstatic.com/onebox/weather/60/';
$replacement[1] = '.png';
$pogoda = str_replace($pattern, $replacement, $current[0]->icon['data']); ?>" alt="weather"?>
<span class="condition">
<?= $current[0]->temp_c['data'] ?>° C,
<?= $current[0]->condition['data'] ?>
</span>
</div>
<h2>Pogoda na kolejne dni:</h2>
<? foreach ($forecast_list as $forecast) : ?>
<div class="weather">
<img src="<?php
$pattern[0] = '/ig/images/weather/';
$pattern[1] = '.gif';
$pattern[2] = 'mostly_sunny';
$pattern[3] = 'sunny';
$replacement[0] = 'http://ssl.gstatic.com/onebox/weather/35/';
$replacement[1] = '.png';
$replacement[2] = 'partly_cloudy';
$replacement[3] = 'sun';
$pogoda = str_replace($pattern, $replacement, $forecast->icon['data']); // Podmiana adresu. ?>" alt="weather"?>
<div><?= $forecast->day_of_week['data']; ?></div>
<span class="condition">
<?= $forecast->low['data'] ?>° F - <?= $forecast->high['data'] ?>° F,
<?= $forecast->condition['data'] ?>
</span>
</div>
<? endforeach ?>
</body>
</html>