Page 18 of 54

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 23 Mar 2011 11:54 pm
by saratogaWX
n9mfk wrote:Hi Ken,
why is pressure trend arrow not on the ajax-gizmo.php?
Beau
In ajax-gizmo.php, the code

Code: Select all

			 if(isset($trend)) {
			  if($commaDecimal) {
				  $Tnow = preg_replace('|,|','.',gizmo_strip_units($baro));
				  $TLast = preg_replace('|,|','.',gizmo_strip_units($trend)); 
			   } else {
				  $Tnow = gizmo_strip_units($baro);
				  $TLast = gizmo_strip_units($trend); 
			   }
			   echo gizmo_gen_difference($Tnow, $Tnow-$TLast, '',
			   langtransstr('Rising') . ' %s '. $uomBaro . langtransstr($uomPerHour),
			   langtransstr('Falling') . ' %s ' . $uomBaro . langtransstr($uomPerHour) ); 
			 } 
determines how to diplay the trend arrow for pressure.

Looking at http://n9mfk.localweatherview.net/CU-defs.php?sce=view shows

Code: Select all

$trend = $WX['presstrendval'];
and http://n9mfk.localweatherview.net/CUtags.php?sce=dump shows

Code: Select all

$WX['presstrend'] = 'Falling';
$WX['presstrendval'] = '-0.012';
I found the prblem in ajax-gizmo and ajax-dashboard code that prevented the baro arrow from displaying properly if the difference was less than 0.1 , and both ajax-gizmo and ajax-dashboard have fixed updates which you can get from here.

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 2:37 am
by n9mfk
Hi Ken,
all updates work good Thanks
Beau

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 10:10 am
by nitrx
I saw that Ray forgot the this month extremes in his template so I've added it for your convience http://apeldoorn.tk/weer/wxcudataextremes.php?lang=en (I don't use it myself because I've them in seperate templates in my menu) the zip is attached you will have to ad one line to your local language translation

langlookup|Extreme Weather Data This Month|Extreme Weather Data This Month| the bold text should be translated for non english in your language-??.txt

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 10:17 am
by actioman
Can someone help me to solve the following situation:

What add to the language of the header so that the banner is centered when we have selected the option Widescreen?
I've tried various ways, but the "XHTML 1.0" validation always gives me some error...

Here is the current and original code:

Code: Select all

<div id="page"><!-- page wrapper -->
<!-- header -->
    <div id="header">
      <h1 class="headerTitle">
        <a href="index.php" title="Browse to homepage"><img src="my-banner.jpg" alt="<?php langtrans($SITE['organ']); ?>" width="770" height="150" border="0" align="middle"/></a>
      </h1>	
	  <div class="headerTemp">
	    <span class="doNotPrint">
 		  <span class="ajax" id="ajaxbigtemp"><?php print isset($tempnodp)?"$tempnodp$tuom":"&nbsp;"; ?>
		  </span>
		</span>
 	  </div>

And this is how it looks:

Image


Thank you again! :)

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 10:46 am
by mcrossley
<h1 class="headerTitle" style="text-align: center;">

may do it? Though this should probably go in a CSS somewhere.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 11:45 am
by gemini06720
gemini06720 wrote:...trying to understand the concept behind the GNU Translation Project 'gettext'...
actioman wrote:Ok, no hurry. If you can, very well. If you can not, well anyway!
Manuel, I must be doing something wrong... After two clean installations of Mike Challis 'Fast Secure Contact Form' scrit files, I cannot get the contact form to display in any other languages other than english, no matter which parameters I use... :evil:

I have not contacted Mike Challis yet as I want to find out by myself why the contact form will not display in french with the french language files already available/installed.

I have also noticed that Mike Challis' scripts do not play all that well when installed and run under XAMPP on a Windows platform - XAMPP = Apache HTTP Server, MySQL database, and interpreters for scripts written in the PHP and Perl languages. I also tried changing the name of the directory where the files are originally installed to (ie: 'contact-files') but, unfortunately, some paths seem to be hard coded into the script rather than relying on the path information variable as entered (declared) during installation... :(
actioman wrote:...I noticed however that you have a different font type. Yours is smaller and therefore looks better on the table.
Where can I change mine, if possible of course?...
Manuel, you should know by now that 'almost' every thing is possible - look at what you have accomplished over the past months, new web pages... :)

As you should be aware, the way much of the web page information is displayed on the screen is through the use of cascading style sheets or CSS - the cascading style sheets are used, not only to offer different colour themes, but also to position the information on the screen.

OK, here is how I do any changes/modifications to my pages without having to change a bunch of CSS files. I have created a new cascading style sheet which I have called 'weather-cumulus.css' and which only contains the properties I want to change on some or all the web pages displayed. So, I have added the following line to my 'weather-cumulus.css' file:

Code: Select all

body {
  font-family: "Trebuchet MS", verdana, helvetica, arial, sans-serif;
}
But, what is very important is that this 'weather-cumulus.css' file be loaded after all the other cascading style sheets have loaded, meaning that a line such as

Code: Select all

<link rel="stylesheet" href="weather-cumulus.css" media="screen" title="screen" />
be added to the end of the 'top.php' file. This way, all the other cascading style sheets are read and processed before this last one is read and modify whatever properties need to be modified (clear as mud... :mrgreen: ).

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 12:25 pm
by gemini06720
nitrx wrote:I saw that Ray forgot the this month extremes in his template so I've added it for your convience...
Ron, indeed, I had completely forgotten about the monthly extremes... :oops: ...got involved with other scripts and for got the month extremes.

Would you mind if I included your modification to the script I have been posting in this forum so everything is combined into one script, one package.

I also noticed and wondered why the month names were not translated on your page ... and I realised that there was not translation for the month names (nor for the day names) in any of the language files... :o ...I have never noticed that before as I have just imported the french language file I had been using for the past 2 years with my Weather Display templates - my 'language-fr.txt' is about 3 times the size of the 'language-en.txt' file!

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 12:30 pm
by nitrx
gemini06720 wrote:
nitrx wrote:I saw that Ray forgot the this month extremes in his template so I've added it for your convience...
Ron, indeed, I had completely forgotten about the monthly extremes... :oops: ...got involved with other scripts and for got the month extremes.

Would you mind if I included your modification to the script I have been posting in this forum so everything is combined into one script, one package.

I also noticed and wondered why the month names were not translated on your page ... and I realised that there was not translation for the month names (nor for the day names) in any of the language files... :o ...I have never noticed that before as I have just imported the french language file I had been using for the past 2 years with my Weather Display templates - my 'language-fr.txt' is about 3 times the size of the 'language-en.txt' file!
I don't mind Ray , I was also wondering about the monthnames .

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 12:39 pm
by gemini06720
nitrx wrote:... I was also wondering about the monthnames ...
Ron, now you know... :D ...translation was never part of the language files... :(

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 12:51 pm
by nitrx
gemini06720 wrote:
nitrx wrote:... I was also wondering about the monthnames ...
Ron, now you know... :D ...translation was never part of the language files... :(
Yes I looked it up , are these adapted from settings.php or from the local language of the PC where cumulus runs :?:

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 12:53 pm
by gemini06720
Find attached the latest release of the 'Weather Data' PHP script.

As indicated in a previous message, included in the ZIP archive are:
  • - 'wxcudata.php', the PHP script
    - 'wxcudata_language-en.txt', the file which contains all the english terms (words/phrases) contained in the template
    - 'wxcudata_language-fr.txt', the french translation
    - 'wxcudata_language-pt.txt', the portuguese translation - thank you Manuel
    - 'CUtags.txt' and 'CUtags-comments.txt', the files/templates containing all the webtags produced by Cumulus
ZIP archive 'Weather Data' was updated to version 1.4 on 24 Mars 2010:
  • - added the extremes for the month - thanks to Ron/nitrx for the suggestion
    - added translations for the month names
    - correction to one of the monthly tags

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 1:15 pm
by gemini06720
gemini06720 wrote:
nitrx wrote:... I was also wondering about the monthnames ...
Ron, now you know... :D ...translation was never part of the language files... :(
nitrx wrote:Yes I looked it up , are these adapted from settings.php or from the local language of the PC where cumulus runs :?:
Ron, the translation of the month names (and a lot of other terms) comes from my 'Weather Display (PHP-AJAX) Website' french language file.

Ron, two years ago, when I worked on the development of the then so called 'Weather Display (PHP-AJAX) Website Templates - Canada Multilingual', I quickly realised that many english terms/expressions were not translating properly into french - and, as someone previously mentioned, I am quite sensitive (read, picky) about grammatically-incorrect language - "speak less but speak properly"! So, I expanded the 'language-fr.txt' file with the proper translations. :mrgreen:

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 1:22 pm
by nitrx
Thanks Ray I've a look at your solution.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 1:28 pm
by gemini06720
nitrx wrote:Thanks Ray I've a look at your solution.
Ron, you can add terms/expressions into your templates (with the 'langtrans()' or the 'langtransstr()' functions) and add the same terms/expressions into your 'language-nl.txt' (with the proper dutch translation) and the terms/expressions will be properly translated/displayed onto your web pages... ;)

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 24 Mar 2011 7:38 pm
by nitrx
gemini06720 wrote:Find attached the latest release of the 'Weather Data' PHP script.

As indicated in a previous message, included in the ZIP archive are:
  • - 'wxcudata.php', the PHP script
    - 'wxcudata_language-en.txt', the file which contains all the english terms (words/phrases) contained in the template
    - 'wxcudata_language-fr.txt', the french translation
    - 'wxcudata_language-pt.txt', the portuguese translation - thank you Manuel
    - 'CUtags.txt' and 'CUtags-comments.txt', the files/templates containing all the webtags produced by Cumulus
ZIP archive 'Weather Data' was updated 24 Mars 2010:
  • - added the extremes for the month - thanks to Ron/nitrx for the suggestion
    - added translations for the month names
Hmmz I tried this but only the months in the all-time extremes are changed in the translation I cheched this while I was trying to make separate templates. http://www.apeldoorn.tk/weer/wxcudatatry.php?lang=en