Hello good afternoon
Yesterday I updated my version of php to 7.2, my previous one was 5.3, and since I updated my forecast in text does not appear on my website.
If they update the icons well, but not the text.
Does anyone know what to do to modify and update it well?
Thank you.
This link is from the forecast on my website that does not update well
here in the original template: https://www.meteoxabia.com/estacions/port/plaintext-parser1.php
And as you see the plaintext.txt if it updates well, but is not reflected in the web, I do not know if it will be necessary to change some script.
Thank you.
Thank you
I have tried and updated the new script but I have also inserted the Spanish language for the translation and it does not translate it to me.
Now you have to set the correct line in the script.
That is line probably around line 159? or 186? and the lines around that point read like this
// Settings ---------------------------------------------------------------
$iconDir ='./forecast/images/'; // directory for carterlake icons
$iconType = '.jpg'; // default type='.jpg' -- use '.gif' for animated icons from http://www.meteotreviglio.com/
$WXSIMstation = "Saratoga-Weather.org"; // name of your weather station
$plaintextFile = './plaintext.txt'; // location of the WXSIM plaintext.txt
$lang = 'en'; // default language is 'en' = English
$tempDegrees = '°'; // set to '' to omit degree sign
Change
$lang = 'en'; // default language is 'en' = English
You changed it on a documentation comment line… you have to change it where Wim pointed it out in order to have it take effect.
Comment lines are not executed by PHP.
The issue seems to be that your webserver is saying the text character set is UTF-8 – the page puts out ISO-8859-1 character set.
Can you attach the source for plaintext-parser1.php (as a .txt file) – I’ll see where a header() statement can be safely added to force the correct character set.
Thank you very much, I have it resolved.
I have taken advantage and I have added a txt file of a new translation to “Valencian”, it is a language very similar to Catalan but with some words that change, I attach the txt file in case you want to add it for future users.
dateformat|d-M-Y h:i a| // USA format 31-Mar-2006 02:03 pm
#dateformat|d/m/Y H:i| // Euro format 31/03/2006 14:03
#dateformat|Y-m-d H:i| // ISO format 2006-03-31 14:03
to:
#dateformat|d-M-Y h:i a| // USA format 31-Mar-2006 02:03 pm
dateformat|d/m/Y H:i| // Euro format 31/03/2006 14:03
#dateformat|Y-m-d H:i| // ISO format 2006-03-31 14:03