Weather by You!
Templates and Projects support => Php templates => Topic started by: alessandro on January 20, 2014, 03:35:38 PM
-
Hello everybody,
I am from Hellas.
I started making a weather site with Weather Blue V2 PHP in this location:
http://www.meteogreece.net/ws/megistilavra/
I have made the translation of the main menu in greek and it works ok.
Altough I have a problem with some phrases were the text appears some hieroglyphic signs(����������) in all languages.
The spots that this appears are:
This month's data --> "Highest Daily Wind Run".
All time Records --> on top and "Highest Monthly Rainfall".
Home --> on top and in the"Observation" square.
Can anyone help me fix it???
Thanks in advance,
Alessandro
-
Hi Alessandro,
I've checked your site and found a few bugs.
So, you could check your TMM page (manage.php)
to update these files:
record_txt.php
thismonth_txt.php
This new version will correct problems with Monthly Rainfall
and Daily Wind Run translation problem.
But, for other dates, I haven't found an evidence.
Since these are "words" taken right from Cumulus
as opposite to other dates that are "pre-formatted",
these are taken from the OS i think! In Cumulus main
screen there the current date in text, it is displayed right?
Regards,
Jacques
-
Hello,
(����������) is a encoding problem. I do not know how to solve this problem, but I know how to bypass it ;D
In file index_txt.php line 10 ( <?php echo $Tr_CondAt.' '.$time; ?></strong></caption> )
change to
<caption style="text-align: left;"><strong><?php echo $Tr_CondAt.' '.$timehhmmss; ?><?php if ($lang == "gr") {setlocale(LC_ALL, 'Greek'); echo(iconv('ISO8859-7', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "en") {setlocale(LC_ALL, 'English'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "cz") {setlocale(LC_ALL, 'Czech'); echo(iconv('ISO8859-2', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "nl") {setlocale(LC_ALL, 'Dutch'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "fi") {setlocale(LC_ALL, 'Finnish'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "fr") {setlocale(LC_ALL, 'French'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "de") {setlocale(LC_ALL, 'German'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "it") {setlocale(LC_ALL, 'Italian'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "no") {setlocale(LC_ALL, 'Norwegian'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "pl") {setlocale(LC_ALL, 'Polish'); echo(iconv('ISO8859-2', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "sl") {setlocale(LC_ALL, 'Slovenian'); echo(iconv('ISO8859-2', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "es") {setlocale(LC_ALL, 'Spanish'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "sv") {setlocale(LC_ALL, 'Swedish'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));} ?></strong></caption>
and in file index.php on line 127 ( <?php echo $dayname.', '.$day.' '.$monthname.' '.$year; ?> )
change to
<?php if ($lang == "gr") {setlocale(LC_ALL, 'Greek'); echo(iconv('ISO8859-7', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "en") {setlocale(LC_ALL, 'English'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "cz") {setlocale(LC_ALL, 'Czech'); echo(iconv('ISO8859-2', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "nl") {setlocale(LC_ALL, 'Dutch'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "fi") {setlocale(LC_ALL, 'Finnish'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "fr") {setlocale(LC_ALL, 'French'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "de") {setlocale(LC_ALL, 'German'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "it") {setlocale(LC_ALL, 'Italian'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "no") {setlocale(LC_ALL, 'Norwegian'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "pl") {setlocale(LC_ALL, 'Polish'); echo(iconv('ISO8859-2', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "sl") {setlocale(LC_ALL, 'Slovenian'); echo(iconv('ISO8859-2', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "es") {setlocale(LC_ALL, 'Spanish'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "sv") {setlocale(LC_ALL, 'Swedish'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));} ?>
Regards,
Otto
-
Hi Otto,
I'm surprised to see that you have to recode some string.
I'm curious to know if you are using wt_data_intl.php
or wt_data_inc.php?
In wt_data_intl.php, all text are using utf8_encode,
so this file is supposed to work.
Regards,
Jacques
-
Hi Jacques,
I have set the Cumulus in Local filenames wt_data_intl.php , and in Remote filenames wt_data_inc.php
Regards,
Otto
-
Hi Alessandro,
I've checked your site and found a few bugs.
So, you could check your TMM page (manage.php)
to update these files:
record_txt.php
thismonth_txt.php
This new version will correct problems with Monthly Rainfall
and Daily Wind Run translation problem.
But, for other dates, I haven't found an evidence.
Since these are "words" taken right from Cumulus
as opposite to other dates that are "pre-formatted",
these are taken from the OS i think! In Cumulus main
screen there the current date in text, it is displayed right?
Regards,
Jacques
I have tried to do the update with TMM page (manage.php) but due to security reasons I cannot do the update automatically.
Where can I find the files so that I can update them manually??
Thanks,
Alessandro
-
Hello,
(����������) is a encoding problem. I do not know how to solve this problem, but I know how to bypass it ;D
In file index_txt.php line 10 ( <?php echo $Tr_CondAt.' '.$time; ?></strong></caption> )
change to
<caption style="text-align: left;"><strong><?php echo $Tr_CondAt.' '.$timehhmmss; ?><?php if ($lang == "gr") {setlocale(LC_ALL, 'Greek'); echo(iconv('ISO8859-7', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "en") {setlocale(LC_ALL, 'English'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "cz") {setlocale(LC_ALL, 'Czech'); echo(iconv('ISO8859-2', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "nl") {setlocale(LC_ALL, 'Dutch'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "fi") {setlocale(LC_ALL, 'Finnish'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "fr") {setlocale(LC_ALL, 'French'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "de") {setlocale(LC_ALL, 'German'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "it") {setlocale(LC_ALL, 'Italian'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "no") {setlocale(LC_ALL, 'Norwegian'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "pl") {setlocale(LC_ALL, 'Polish'); echo(iconv('ISO8859-2', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "sl") {setlocale(LC_ALL, 'Slovenian'); echo(iconv('ISO8859-2', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "es") {setlocale(LC_ALL, 'Spanish'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));}
elseif ($lang == "sv") {setlocale(LC_ALL, 'Swedish'); echo(iconv('ISO8859-1', 'UTF-8',strftime(' , %d %B %Y')));} ?></strong></caption>
and in file index.php on line 127 ( <?php echo $dayname.', '.$day.' '.$monthname.' '.$year; ?> )
change to
<?php if ($lang == "gr") {setlocale(LC_ALL, 'Greek'); echo(iconv('ISO8859-7', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "en") {setlocale(LC_ALL, 'English'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "cz") {setlocale(LC_ALL, 'Czech'); echo(iconv('ISO8859-2', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "nl") {setlocale(LC_ALL, 'Dutch'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "fi") {setlocale(LC_ALL, 'Finnish'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "fr") {setlocale(LC_ALL, 'French'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "de") {setlocale(LC_ALL, 'German'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "it") {setlocale(LC_ALL, 'Italian'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "no") {setlocale(LC_ALL, 'Norwegian'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "pl") {setlocale(LC_ALL, 'Polish'); echo(iconv('ISO8859-2', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "sl") {setlocale(LC_ALL, 'Slovenian'); echo(iconv('ISO8859-2', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "es") {setlocale(LC_ALL, 'Spanish'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));}
elseif ($lang == "sv") {setlocale(LC_ALL, 'Swedish'); echo(iconv('ISO8859-1', 'UTF-8',strftime('%A, %d %B %Y')));} ?>
Regards,
Otto
Hello Otto,
Thanks for the advice.
I have changed the code successfully and the hieroglyphics dissappeared.
Altough there is still a problem because as you can see, the date appears in English in every language.
http://www.meteogreece.net/ws/megistilavra/
Thanks a lot ,
Alessandro
-
Hello Alessandro,
Hmm....on my local server it works.....
Can you send me your index.php and index_txt.php to my e-mail ?
postmaster@weather-in-banska-stiavnica.sk
Regards,
Otto