![]() |
||||
|
|
||||
[Chameleon] language changeDebbie Pagurek pagurekd@agr.gc.caThu, 25 Mar 2004 09:54:59 -0500
|
||||
This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.
--=_63424CDB.8FEE8DF9
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi all,
I hate to muddy the waters on the Chameleon list, but I also have the
old CWC2 product installed on my systems and I'd like to get the
language translation working there as well. However, I keep seeing a
javascript error that says that setLanguage is undefined.
Jason or anyone else...
how is the Language widget used in the old CWC2 product? What is the
difference between implementing it in CWC2 vs the latest Chameleon
version?
Thanks for your help.
D. Pagurek
>>> Jason Fournier <jfournier@dmsolutions.ca> 03/23/04 05:40PM >>>
Debbie,
Along with the required SharedResource Declaration you will have to add=20
the following lines just before you initialize the application=20
index.phtml. Here's an example:
$oApp =3D new MapApp(); // this is the class in index.phtml which extends
the Chameleon class
$oApp->CWCAddRegionalTemplate( "en-CA", "mymap_en.html");
$oApp->CWCAddRegionalTemplate( "fr-CA", "mymap_fr.html");
$oApp->CWCInitialize( $szTemplate, $szMapFile );
This assumes that you have created mymap_en.html and mymap_fr.html.
To switch over, for example, from an English to French template you=20
would add a link in your english template similar to:
<a href=3D"javascript:setLanguage('fr-CA');">Fran=E7ais</a>
The MLT should handle translation between English and French for the=20
widgets you are using.
I believe this should do it.
Jason
Debbie Pagurek wrote:
> Hi all,
> can anyone give me some pointers on how to use the language widget?
> =20
> <cwc2 type=3D"language">
> <language name=3D"en-CA"/>
> <language name=3D"fr-CA"/>
> </cwc2>
> =20
> What are the supporting things needed to make this work?
> =20
> I would like to switch between english and french. What else needs to
> be in my template files (both the english and french .html files) to=20
> make the switch happen? I see that there is a function=20
> CWCSetLanguage(szTmpLanguage) in the cwcjsapi.js file - do I need to=20
> use this? And if so, how? I'm not sure if that .js file is for the=20
> old CWC2 product or not.
> =20
> Please, anyone who can provide info for me on how to switch language=20
> templates, I'd really appreciate the help.
> =20
> Thanks,
> D. Pagurek
--=20
___________________________
Jason Fournier
DM Solutions Group
Application Developer
Ottawa, ON
613.565.5056 x 18
jfournier@dmsolutions.ca
--=_63424CDB.8FEE8DF9
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Description: HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY style="MARGIN-TOP: 2px; FONT: 10pt Arial; MARGIN-LEFT: 2px">
<DIV>Hi all,</DIV>
<DIV>I hate to muddy the waters on the Chameleon list, but I also have
the old CWC2 product installed on my systems and I'd like to get the
language translation working there as well. However, I keep seeing a
javascript error that says that setLanguage is undefined.</DIV>
<DIV> </DIV>
<DIV>Jason or anyone else...</DIV>
<DIV>how is the Language widget used in the old CWC2 product? What is the
difference between implementing it in CWC2 vs the latest Chameleon
version?</DIV>
<DIV> </DIV>
<DIV>Thanks for your help.</DIV>
<DIV> </DIV>
<DIV>D. Pagurek</DIV>
<DIV><BR><BR>>>> Jason Fournier <jfournier@dmsolutions.ca>
03/23/04 05:40PM >>><BR>Debbie,<BR><BR>Along with the required
SharedResource Declaration you will have to add <BR>the following lines just
before you initialize the application <BR>index.phtml. Here's an
example:<BR><BR>$oApp = new MapApp(); // this is the class in index.phtml
which extends <BR>the Chameleon class<BR>$oApp->CWCAddRegionalTemplate(
"en-CA", "mymap_en.html");<BR>$oApp->CWCAddRegionalTemplate( "fr-CA",
"mymap_fr.html");<BR>$oApp->CWCInitialize( $szTemplate, $szMapFile
);<BR><BR>This assumes that you have created mymap_en.html and
mymap_fr.html.<BR><BR>To switch over, for example, from an English to French
template you <BR>would add a link in your english template similar
to:<BR><BR><a
href="javascript:setLanguage('fr-CA');">Français</a><BR><BR>The MLT
should handle translation between English and French for the <BR>widgets you are
using.<BR><BR>I believe this should do it.<BR><BR>Jason<BR><BR><BR><BR>Debbie
Pagurek wrote:<BR><BR>> Hi all,<BR>> can anyone give me some pointers on
how to use the language widget?<BR>> <BR>> <cwc2
type="language"><BR>> <language name="en-CA"/><BR>> <language
name="fr-CA"/><BR>> </cwc2><BR>> <BR>> What are the
supporting things needed to make this work?<BR>> <BR>> I would like
to switch between english and french. What else needs to <BR>> be in my
template files (both the english and french .html files) to <BR>> make the
switch happen? I see that there is a function <BR>>
CWCSetLanguage(szTmpLanguage) in the cwcjsapi.js file - do I need to
<BR>> use this? And if so, how? I'm not sure if that .js file is
for the <BR>> old CWC2 product or not.<BR>> <BR>> Please, anyone
who can provide info for me on how to switch language <BR>> templates, I'd
really appreciate the help.<BR>> <BR>> Thanks,<BR>> D.
Pagurek<BR><BR><BR>-- <BR>___________________________<BR>Jason Fournier<BR>DM
Solutions Group<BR>Application Developer<BR>Ottawa, ON<BR>613.565.5056 x
18<BR>jfournier@dmsolutions.ca<BR><BR><BR><BR></DIV></BODY></HTML>
--=_63424CDB.8FEE8DF9--
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |