On Sat, 20 Oct 2001, Anand wrote:
But by langcodes, when i type "How are you",
the code is passed to the
user and he sees it as
"AAp kaise hain" in devanagari script.
In other words, the entire text gets translated in phrases.
Yes, I got that on the second reading, but I don't think it's
technically feasible. At NCST, we are doing a lot of work on natural
language processing, and have some idea of the tasks required. My
thought would be to implement it on the server and use multiviews to
send the correct content.
Since I have some time now, I'll go into details.
When a browser makes a request to a server, it sends in the header lines
like Accept-encoding and Accept-language:
In the Accept-language header, it specifies a list of languages in
descending order of preference in which it would like the content.
For example, I may set my browser to request content in the order
en fr es it de nl
When I request a file called say content.html, the request to the server
looks like this:
GET /content.html HTTP/1.0
Accept-language: en fr es it de nl
Let's say the server is configured with multiviews. It notices that the
browser would like english content if possible, for content.html. It
looks for a file called content.html.en, and if found, returns that as
content.html. If not found, it looks for a file called content.html.fr,
and proceeds until the end of the list, after which, it returns the
default content.html that was present.
Typically, the content developer would have to create content in all
these languages, but, using something like babel fish, or the tools we
develop at NCST, the server can be made to automatically create content
for all pages based on the language required.
We still have the problem of a single page having different content.
This can be solved by actually specifying which content to use on the
server side, using something like SSI.
In any case, I do not think that this should be implemented at the
client side at all. Storing a list of common phrases is not sufficient,
as uncommon phrases are more common on the Internet. I know that sounds
weird, but if you think about it, you'll notice that the two uses of
common refer to different things.
Refreshed by a brief blackout, I got to my feet and went next door.
-- Martin Amis, _Money_
Visit my webpage at http://www.ncst.ernet.in/~philip/
Read my writings at http://www.ncst.ernet.in/~philip/writings/
MSN philiptellis Yahoo! philiptellis
AIM philiptellis ICQ 129711328