Groups | Blog | Home
all groups > inetserver asp general > november 2003 >

inetserver asp general : How can ASP support multiple languages?


Ray at <%=sLocation%
11/12/2003 3:45:44 PM

[quoted text, click to view]

Your best bet is to research with Fed Ex to see if they offer a component,
rather than trying to use xmlhttp to try to "screen scrape" their site or
something like that.

[quoted text, click to view]

Your processor should either provide you with a component to use on your
server a link to their server and transactions will take place there.


[quoted text, click to view]

Write your pages in multiple langues. :/

Ray at work

CM
11/12/2003 3:46:58 PM
Hi, there:

I have some questions, I hope someone can briefly describe how ASP (not
ASP.Net) to do the following things:

1) Get real-time information from other web site such as tracking via
Fed-Ex;

2) Real-time credit card charging via a payment gateway such as WorldPay;

3) How to support multiple languages.

Thanks a lot!

CM

CM
11/12/2003 4:24:33 PM
Thank you very much for the quick answer!
So, for the multiple languages question, that means ASP doesn't support
multiple languages. But ASP.Net can, Am I right?
CM

[quoted text, click to view]

Ray at <%=sLocation%
11/12/2003 4:35:02 PM
By multiple languages, you mean English and Portuguese, for example, not
vbscript and jscript, yes?

What I believe that some people do is put all their page contents in a
database, and have a table (or column, or whatever) for each language. And
to determine the language to default to, you can use
request.SErvervariables("HTTP_ACCEPT_LANGUAGE"). Maybe something like:

<%
Dim sLanguage
sLanguage = UCase(Left(Request.sErverVariables("HTTP_ACCEPT_LANGUAGE"), 2))
sSQL = "SELECT [PageContent] FROM [" & sLanguage & "] WHERE [PageID]=1"
Set oADO = Server.CreateObject("ADODB.Connection")
oADO.Open YourConnectionString
Set rsContent = oADO.Execute(sSQL)
sContent = rsContent.Fields.Item(0).Value
rsContent.Close : Set rsContent = Nothing
oADO.Close : Set oADO = Nothing


Response.Write sContent
%>

This is where you'd have a database with a table named EN and a table named
PT, and those tables would contain the content in the appropriate language.
This, of course, isn't how you'd have to structure your DB, but in theory,
this is one way to do it.

Ray at work





[quoted text, click to view]

CM
11/12/2003 6:24:45 PM
Thanks a lot! This is just what I want to know.
CM

[quoted text, click to view]

Arnold Shore
11/12/2003 8:11:14 PM
Distinguish between these languages in the user interface, or in the data
you capture and present. These are different issues.

In the latter case, I use UTF-8 as the charset, which ACCESS supports. I'm
handling Cyrillic, Arabic and Hebrew, and the CJK far-eastern languages as
well as the western ones, in an English ASP user interface. No sweat. HTH.

AS



AddThis Social Bookmark Button