| Author |
multilanguage dynamic pages.... how to make the codepage dynamic?
|
|
|
| hi,
i'm building a site which need to be in several languages (hebrew, russian
and english).
using the first line
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1255"%>
all dynamic data (from an access db) displays correctly in hebrew. using
codepage"1251" and it will display correctly in russian....
my problem is that i obviously don't want to create the site 3 times but
have all the content in a db. does anyone know how i can make the codepage
dynamic depending on which language i'm viewing. i already have the page's
default encoding doing this e.g.
<%
varLang=Request.QueryString("lang")
%>
<%
if varLang = "heb" then
varChar = "1255"
varDir = "rtl"
varAlign = "right"
end if
if varLang = "rus" then
varChar = "1251"
varDir = "ltr"
varAlign = "left"
end if
%>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-<%=varChar%>">
which works fine, but when i try and do something similar with the codepage
it throws errors.
for example i tried
<%@LANGUAGE="VBSCRIPT" if Request.QueryString("lang") = "rus" then codepage=
1251 else codepage= 1255%>
which unsurprisingly gave me an error
Active Server Pages, ASP 0221 (0x80004005)
The specified 'if Request.QueryString("lang") = "rus" then codepage= 1251
else codepage= 1255' option is unknown or invalid.
does anyone have any bright ideas?
many thanks
dog
| |
| Julian Roberts 2004-08-26, 12:18 pm |
| You could have
<%@LANGUAGE="VBSCRIPT"%>
<%
Session.Codepage=Request.QueryString("lang")
%>
--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004
| |
|
| wonderful jules, that worked perfect.....
thank you very much
dog
"Julian Roberts" <newsg@charon.co.uk> wrote in message
news:cgf99g$7pf$1@forums.macromedia.com...
> You could have
>
> <%@LANGUAGE="VBSCRIPT"%>
> <%
> Session.Codepage=Request.QueryString("lang")
> %>
>
> --
> Jules
> http://www.charon.co.uk/charoncart
> Charon Cart 3
> Shopping Cart Extension for Dreamweaver MX/MX 2004
>
>
|
|
|
|
| Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |