<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6617.47">
<TITLE>Language Functionality in 2.4</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P ALIGN=LEFT><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Arial">I</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Arial">’</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Arial">m attempting to implement the MLT option in Chameleon 2.4.</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"> <FONT SIZE=2 FACE="Arial">I have an</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"> <FONT SIZE=2 FACE="Arial">application</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Arial"> which has been</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"> <FONT SIZE=2 FACE="Arial">successfully</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Arial"> 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.</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"> <FONT SIZE=2 FACE="Arial">However, now get the following error when trying to open a map.</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-ca">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</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-ca">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 <FONT FACE="Wingdings" SIZE=3>J</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-ca">The phtml file is below</SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-ca">Thanks,</SPAN></P>
<BR>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"><?php</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">/*</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> * this is a sample of a minimal application script required to</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> * get a chameleon application running with a template and a</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> * local map file. Most applications should actually just</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> * copy this file and modify the template and mapfile</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> * parts and should not need to do a lot more here.</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> */</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">$gszAppPath = dirname(__FILE__);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">include( "/Mapserver/chameleon/htdocs/chameleon.php" );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">$szMapFile = dirname(__FILE__)."/../map/cabinbase.map";</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">class CabinApp extends Chameleon</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">{</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> function CabinApp()</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> {</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> parent::Chameleon();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> $this->moMapSession = new MapSession_RW;</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> $this->moMapSession->setTempDir( getSessionSavePath());</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> }</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">}</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">$oApp = new CabinApp();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">$oApp->mnMinimumMaturityLevel = MATURITY_ALPHA;</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">$oApp->registerSkin( 'skins/sample' );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">/** Setting Variable for Return Page of Application</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">*/</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">if( isset( $_REQUEST['txtreturnpage'] ) )</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> $oApp->setVar( 'HISTORYPAGE', $_REQUEST['txtreturnpage'] );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">else {</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> if( isset( $_REQUEST['historypage'] ) )</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> $oApp->setVar( 'HISTORYPAGE', $_REQUEST['historypage'] );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> else</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> $oApp->setVar( 'HISTORYPAGE', 'null' );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">}</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">$oApp->CWCAddRegionalTemplate( 'en-CA', dirname(__FILE__).'/cabin_data_map_en.html', dirname(__FILE__).'/cabin_data_map_en.php' );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">$oApp->CWCAddRegionalTemplate( 'fr-CA', dirname(__FILE__).'/cabin_data_map_fr.html', dirname(__FILE__).'/cabin_data_map_fr.php' );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">$oApp->CWCInitialize( dirname(__FILE__).'/cabin_data_map_en.html', $szMapFile );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">$oApp->CWCExecute();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">?></FONT></SPAN><SPAN LANG="en-ca"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"></SPAN><A NAME=""><SPAN LANG="en-us"></SPAN></A></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#000080" FACE="Comic Sans MS">Timothy Pascoe</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-us"></SPAN></P>
<BR>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#800080" SIZE=2 FACE="Verdana">Environment Canada / Environnement Canada<BR>
Canada Centre for Inland Waters / Centre Canadien des Eaux Intérieures<BR>
867 Lakeshore Road / 867, chemin Lakeshore<BR>
Burlington, Ontario / Burlington (Ontario)</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#800080" SIZE=2 FACE="Verdana">L7R 4A6<BR>
<BR>
</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-us"><FONT COLOR="#008000" SIZE=2 FACE="Trebuchet MS">Tel/Tél: (905) 336-6239<BR>
Fax/</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-us"><FONT COLOR="#008000" SIZE=2 FACE="Trebuchet MS">Téléc</FONT></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-us"><FONT COLOR="#008000" SIZE=2 FACE="Trebuchet MS">: (905) 336-4699<BR>
E-mail/C. élec:</FONT></SPAN><SPAN LANG="en-ca"> </SPAN><A HREF="mailto:tim.pascoe@ec.gc.ca"><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"><U></U></SPAN><U><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Trebuchet MS">tim.pascoe@ec.gc.ca</FONT></SPAN></U><SPAN LANG="en-ca"></SPAN></A><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-us"><BR>
</SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-us"><FONT COLOR="#000080" SIZE=2 FACE="Tahoma">Government of Canada/Gouvernement du Canada</FONT></SPAN></P>
<P ALIGN=LEFT><I><SPAN LANG="en-us"><FONT COLOR="#808080" SIZE=1 FACE="Comic Sans MS">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.</FONT></SPAN></I><SPAN LANG="en-ca"></SPAN><SPAN LANG="en-us"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-ca"></SPAN></P>
</BODY>
</HTML>