Hi Giorgio,
 
To get the correct message being displayed in your _javascript_ alert you can use the method Ben suggested or you can change "ENCODERESULTS" in your witango.ini.
 
If you have ENCODERESULTS=TRUE then W�hlen will appear as W&#228:hlen
If you have ENCODERESULTS=FALSE then W�hlen will appear as W�hlen
 
You will need to restart your witango server for the change to take effect.
 
Fergal
 
----- Original Message -----
Sent: Thursday, February 05, 2004 1:54 AM
Subject: Re: Witango-Talk: multi-language website

Dave,
 
thank you for your answer but my problem is the "translate" in _javascript_ of Witango Variable.
If I use a special european letter like "witango server translate in  &#228 (I use encoding=_javascript_)
This is a real problem in _javascript_ code.
It's a limited of witango encoding ?
Bye
 
Regards
 
Giorgio
 
 
----- Original Message -----
Sent: Wednesday, February 04, 2004 3:22 PM
Subject: RE: Witango-Talk: multi-language website

Giorgio,

 

There is no C style switch/case statement in Witango. It would be nice though, I hope they include it someday. I implemented a switch/case years ago with custom tags when they were first developed.

 

We built a multi-language application once. We did it something like this. Say you have 100 different text messages in 4 languages. You put them all in a 100 x 4 domain scope array, domain$textMessages. When the user picks a language you set a user scope variable, user$language, to 1,2,3 or 4. Then you can display message 42 in language 3 (or any other combination) with one @var tag.

Ie <@var domain$textMessages[<@var local$messageNum>,<@var user$language>]>

 

This way you don�t need to put the text in long if/elseif constructs. The messages can all be stored in a database or in a text file where they can be spell checked and grammar checked and corrected without touching your code.

 

Hope this helps

Dave Shelley

 

-----Original Message-----
From: Ferr� A&T - Giorgio Tassistro [mailto:[EMAIL PROTECTED]
Sent: February 4, 2004 4:17 AM
To: [EMAIL PROTECTED]
Subject: Witango-Talk: multi-language website

 

Hi all,

I have a little problem with a multi-language website.

See this sample:

 

<@ASSIGN user$Lang "DE">

.

.

 

<@IF "@@user$lang='UK'">
<@ASSIGN TextChoose "Choose before the number of passengers">
<@ELSEIF "@@user$lang='DE'">
<@ASSIGN TextChoose value="W�hlen sie zuerst die Anzahl der Passagieren aus" encoding=none>
<@ELSE>
<@ASSIGN TextChoose "E<@SQ> necessario in inserire prima i passeggeri">
</@IF>

.

.
<script language=_javascript_>
alert('<@VAR TextChoose encoding=_javascript_>');

</script>

 

If the language is deutch (lang='DE') the windows builds with "alert()" is "W&#228;hlen .... etc"

 

I choosed this alternative method :

 

alert(unscape('<@VAR TextChoose encoding=URL>'));

 

But is there another witango method ?

Is There a "switch/case like C" method that i don't know ?

Thanks

 

Best regards

 

Giorgio

 

 

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to