[Chameleon] Language Functionality in 2.4

Pascoe,Tim [Burlington] Tim.Pascoe at ec.gc.ca
Mon Jul 17 09:43:46 EDT 2006


Julien,

	It was actually a problem with the phtml initialisation file  :) I modified my file based on the sample application, and had an extra layer in one of my path statements by accident.
	However, I'm not sure my widgets are all implemented properly. For example, much of the tool-tip test I have is located in the widget call itself, not in a language file. So even with the language widget operating properly, much of the text I have is still not translated. Are tool tips moved to the language file in 2.4? Again, there seems to be no documentation, so it's difficult to muddle through.

	Thanks,

Timothy Pascoe

Environment Canada / Environnement Canada
Canada Centre for Inland Waters / Centre Canadien des Eaux Intérieures
867 Lakeshore Road / 867, chemin Lakeshore
Burlington, Ontario / Burlington (Ontario)
L7R 4A6

Tel/Tél: (905) 336-6239
Fax/Téléc: (905) 336-4699
E-mail/C. élec: tim.pascoe at ec.gc.ca
Government of Canada/Gouvernement du Canada
This e-mail represents the opinions and views solely held by its author and in no manner may be considered as representing those of his/her employer.


-----Original Message-----
From: Julien-Samuel Lacroix [mailto:jlacroix at mapgears.com] 
Sent: July 17, 2006 9:30 AM
To: Pascoe,Tim [Burlington]
Cc: chameleon at lists.maptools.org
Subject: Re: [Chameleon] Language Functionality in 2.4

Hi,
It seems that you mapfile was not read correctly...Did you changed you 
MapServer version at the same time?

Julien

Pascoe,Tim [Burlington] wrote:
> I'm attempting to implement the MLT option in Chameleon 2.4. I have an 
> application which has been successfully migrated to 2.4 for a while, but 
> now requires both French and English. I looked at the bilingual example 
> in the Chameleon samples, and modified my .phtml file accordingly. 
> However, now get the following error when trying to open a map.
> 
> PHP Fatal error: Call to a member function set() on a non-object in 
> C:\Mapserver\chameleon\htdocs\widgets\KeyMap\KeyMap.widget.php on line 197
> 
> Are there further changes I need to make to the map template as well, or 
> am I missing something else? Any pointer to documentation on this would 
> be great. I looked through the Chameleon pages on Maptools, but it's 
> pretty thin J
> 
> The phtml file is below
> 
> Thanks,
> 
> 
> <?php
> 
> /*
> 
>  * this is a sample of a minimal application script required to
> 
>  * get a chameleon application running with a template and a
> 
>  * local map file.  Most applications should actually just
> 
>  * copy this file and modify the template and mapfile
> 
>  * parts and should not need to do a lot more here.
> 
>  */
> 
> $gszAppPath = dirname(__FILE__);
> 
> include( "/Mapserver/chameleon/htdocs/chameleon.php" );
> 
> $szMapFile = dirname(__FILE__)."/../map/cabinbase.map";
> 
> class CabinApp extends Chameleon
> 
> {
> 
>   function CabinApp()
> 
>   {
> 
>     parent::Chameleon();
> 
>     $this->moMapSession = new MapSession_RW;
> 
>     $this->moMapSession->setTempDir( getSessionSavePath());
> 
>   }
> 
> }
> 
> $oApp =  new CabinApp();
> 
> $oApp->mnMinimumMaturityLevel = MATURITY_ALPHA;
> 
> $oApp->registerSkin( 'skins/sample' );
> 
> /** Setting Variable for Return Page of Application
> 
> */
> 
> if( isset( $_REQUEST['txtreturnpage'] ) )
> 
>      $oApp->setVar( 'HISTORYPAGE', $_REQUEST['txtreturnpage'] );
> 
> else {
> 
>      if( isset( $_REQUEST['historypage'] ) )
> 
>          $oApp->setVar( 'HISTORYPAGE', $_REQUEST['historypage'] );
> 
>      else
> 
>          $oApp->setVar( 'HISTORYPAGE', 'null' );
> 
> }
> 
> $oApp->CWCAddRegionalTemplate( 'en-CA', 
> dirname(__FILE__).'/cabin_data_map_en.html', 
> dirname(__FILE__).'/cabin_data_map_en.php' );
> 
> $oApp->CWCAddRegionalTemplate( 'fr-CA', 
> dirname(__FILE__).'/cabin_data_map_fr.html', 
> dirname(__FILE__).'/cabin_data_map_fr.php' );
> 
> $oApp->CWCInitialize( dirname(__FILE__).'/cabin_data_map_en.html', 
> $szMapFile  );
> 
> $oApp->CWCExecute();
> 
> ?>
> 
> Timothy Pascoe
> 
> 
> Environment Canada / Environnement Canada
> Canada Centre for Inland Waters / Centre Canadien des Eaux Intérieures
> 867 Lakeshore Road / 867, chemin Lakeshore
> Burlington, Ontario / Burlington (Ontario)
> 
> L7R 4A6
> 
> Tel/Tél: (905) 336-6239
> Fax/Téléc: (905) 336-4699
> E-mail/C. élec: ___tim.pascoe at ec.gc.ca_ <mailto:tim.pascoe at ec.gc.ca>
> Government of Canada/Gouvernement du Canada
> 
> /This e-mail represents the opinions and views solely held by its author 
> and in no manner may be considered as representing those of his/her 
> employer./
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/



More information about the Chameleon mailing list