Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Translate $ tomorrowdaylength?
Moderator: daj
-
MeteoBisignano
- Posts: 79
- Joined: Mon 09 Mar 2015 10:45 am
- Weather Station: wh3080
- Operating System: windows
- Location: Cosenza
Translate $ tomorrowdaylength?
Good Sunday to all
I wanted to ask how do I make it into another language (Italian) the
following WebTAG Cumulus $ tomorrowdaylength?
I wanted to ask how do I make it into another language (Italian) the
following WebTAG Cumulus $ tomorrowdaylength?
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Translate $ tomorrowdaylength?
If you want to translate it, you'll have to parse the string and convert it yourself.
Steve
-
MeteoBisignano
- Posts: 79
- Joined: Mon 09 Mar 2015 10:45 am
- Weather Station: wh3080
- Operating System: windows
- Location: Cosenza
Re: Translate $ tomorrowdaylength?
Hi Steve and good Sunday.steve wrote:If you want to translate it, you'll have to parse the string and convert it yourself.
Unfortunately I do not remember the file to edit, do not even remember its location
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Translate $ tomorrowdaylength?
It's not in any files that are supplied with Cumulus, it is simply a web tag - <#tomorrowdaylength> - so I can't help with you with what file it is in. If you're using the web tag already, it must be in a file that you have told Cumulus to process, on the files tab of the internet settings. The fact that you have used a '$' rather than the usual web tag format suggests that it may be in a PHP file.
Steve
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Translate $ tomorrowdaylength?
This php fonction converts $DL ($tomorrowdaylength) in +- Xmin XXs
Code: Select all
function CVRTDAYL($DL) {
$marqueurDL = "be ";
$debutDL = strpos( $DL, $marqueurDL ) + strlen( $marqueurDL );
$sign = "- ";
$finDL = strpos( $DL, " less" );
if ($finDL == 0)
{
$sign = "+ ";
$finDL = strpos( $DL, " more" );
}
$textDL = substr( $DL, $debutDL, $finDL - $debutDL );
return $sign.$textDL;
}You do not have the required permissions to view the files attached to this post.
-
MeteoBisignano
- Posts: 79
- Joined: Mon 09 Mar 2015 10:45 am
- Weather Station: wh3080
- Operating System: windows
- Location: Cosenza
Re: Translate $ tomorrowdaylength?
laulau wrote:This php fonction converts $DL ($tomorrowdaylength) in +- Xmin XXsCode: Select all
function CVRTDAYL($DL) { $marqueurDL = "be "; $debutDL = strpos( $DL, $marqueurDL ) + strlen( $marqueurDL ); $sign = "- "; $finDL = strpos( $DL, " less" ); if ($finDL == 0) { $sign = "+ "; $finDL = strpos( $DL, " more" ); } $textDL = substr( $DL, $debutDL, $finDL - $debutDL ); return $sign.$textDL; }
I inserted the function suggested in the file that processes Cumulus (wt_data_intl.php) but it does not happen nulla.Evidentemente mistake to add in the right place
Last edited by MeteoBisignano on Mon 16 Mar 2015 9:20 am, edited 1 time in total.
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Translate $ tomorrowdaylength?
Hi,
If you are using a 'cumuluwebtags.php' file with all the webtags or something equivalent, just put it at the end of the file and create a new variable that calls the function:
If you include the cumuluwebtags.php in a web page you can then use $tomorrowDL instead of $tomorrowdaylength
If you are using a 'cumuluwebtags.php' file with all the webtags or something equivalent, just put it at the end of the file and create a new variable that calls the function:
Code: Select all
$tomorrowdaylength = "<#tomorrowdaylength>"; // string giving the difference between the length of day today and tomorrow
$tomorrowDL =CVRTDAYL($tomorrowdaylength)-
MeteoBisignano
- Posts: 79
- Joined: Mon 09 Mar 2015 10:45 am
- Weather Station: wh3080
- Operating System: windows
- Location: Cosenza
Re: Translate $ tomorrowdaylength?
laulau wrote:Hi,
If you are using a 'cumuluwebtags.php' file with all the webtags or something equivalent, just put it at the end of the file and create a new variable that calls the function:
If you include the cumuluwebtags.php in a web page you can then use $tomorrowDL instead of $tomorrowdaylengthCode: Select all
$tomorrowdaylength = "<#tomorrowdaylength>"; // string giving the difference between the length of day today and tomorrow $tomorrowDL =CVRTDAYL($tomorrowdaylength)
As suggested I put the function in the bottom of the page like this:
$LatestErrorTime = "<#LatestErrorTime>"; // The time of the latest error logged to the error log window, using the system short time format. Gives a when dashes latest error is reset
CVRTDAYL function ($ DL) {
$marqueurDL = "be";
$debutDL = strpos ($ DL, $marqueurDL) + strlen ($marqueurDL);
$sign = "-";
$Findl = strpos ($ DL, "less");
if ($ Findl == 0)
{
$ sign = "+";
$ Findl = strpos ($ DL, "more");
}
$ textDL = substr ($ DL, $ debutDL, Findl $ - $ debutDL);
return $ sign. $ textDL;
}
//====================================================================================================================
//
$tomorrowDL = CVRTDAYL ( $tomorrowdaylength)
?>
but does not work
-
MeteoBisignano
- Posts: 79
- Joined: Mon 09 Mar 2015 10:45 am
- Weather Station: wh3080
- Operating System: windows
- Location: Cosenza
Re: Translate $ tomorrowdaylength?
the WebTAG
$ tomorrowDL = CVRTDAYL ($ tomorrowdaylength)
must be included, or so we must add also:
$ tomorrowDL = <"CVRTDAYL ($ tomorrowdaylength)">; ?
The function previously attached is inserted in the file cumuluwebtag.php beginning or at the end of the code? It must be so set?
<? php function CVRTDAYL ($ DL) {
$ marqueurDL = "be";
$ debutDL = strpos ($ DL, $ marqueurDL) + strlen ($ marqueurDL);
$ sign = "-";
$ Findl = strpos ($ DL, "less");
if ($ Findl == 0)
{
$ sign = "+";
$ Findl = strpos ($ DL, "more");
}
$ textDL = substr ($ DL, $ debutDL, Findl $ - $ debutDL);
return $ sign. $ textDL;
};?>
Thanks for your patience and help meticulous
$ tomorrowDL = CVRTDAYL ($ tomorrowdaylength)
must be included, or so we must add also:
$ tomorrowDL = <"CVRTDAYL ($ tomorrowdaylength)">; ?
The function previously attached is inserted in the file cumuluwebtag.php beginning or at the end of the code? It must be so set?
<? php function CVRTDAYL ($ DL) {
$ marqueurDL = "be";
$ debutDL = strpos ($ DL, $ marqueurDL) + strlen ($ marqueurDL);
$ sign = "-";
$ Findl = strpos ($ DL, "less");
if ($ Findl == 0)
{
$ sign = "+";
$ Findl = strpos ($ DL, "more");
}
$ textDL = substr ($ DL, $ debutDL, Findl $ - $ debutDL);
return $ sign. $ textDL;
};?>
Thanks for your patience and help meticulous
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Translate $ tomorrowdaylength?
The link to my cumuluswebtags.php : http://meteo.laurentmey.fr/php/cumulusw ... ource=view
And in my web pages :
And in my web pages :
Code: Select all
<?php
require_once("cumuluswebtags.php");
?>-
MeteoBisignano
- Posts: 79
- Joined: Mon 09 Mar 2015 10:45 am
- Weather Station: wh3080
- Operating System: windows
- Location: Cosenza
Re: Translate $ tomorrowdaylength?
Now it works perfectly.
Thank you for your patience and precision demonstrated.
I had a look at your site and I noticed a dial dashboard 2.5.5
I wanted to know how do I add the graph "Base clouds" in section trend.php?
Thanks again for the support
Weather Station bisignano.it
Thank you for your patience and precision demonstrated.
I had a look at your site and I noticed a dial dashboard 2.5.5
I wanted to know how do I add the graph "Base clouds" in section trend.php?
Thanks again for the support
Weather Station bisignano.it
-
MeteoBisignano
- Posts: 79
- Joined: Mon 09 Mar 2015 10:45 am
- Weather Station: wh3080
- Operating System: windows
- Location: Cosenza
Re: Translate $ tomorrowdaylength?
He tells me that "are not authorized to view the page"laulau wrote:Look here : https://cumulus.hosiene.co.uk/viewtopic.p ... 9&start=43
-
duke
Re: Translate $ tomorrowdaylength?
Yes, you do not have access to the MX part of the forum.MeteoBisignano wrote:He tells me that "are not authorized to view the page"laulau wrote:Look here : https://cumulus.hosiene.co.uk/viewtopic.p ... 9&start=43