|
From: | Chuck Houpt |
Subject: | Re: [Lynx-dev] Proposed patch to init preferred-doc-lang from LANG/LANGUAGE |
Date: | Fri, 27 Apr 2007 11:58:58 -0400 |
At 6:55 PM +0000 4/26/07, Thorsten Glaser wrote:
Chuck Houpt dixit:However, since LC_MESSAGES is designed to control the language used for "informative messages", and web pages are a kind of informational message,They aren't. They are *data*, not part of the programme. Otherwise, content you write in a word processor would be an informative message of it? Even GPL'd if the word processor itself is?
I think you've gotten to the heart of the issue. Are web pages/sites just data? Certainly, if Lynx was just a static HTML file viewer program, like the text viewers more/less, then I would agree 100% with you.
However, I think web sites have more in common with interpreted programs than static data. A web site executes via a combination of a local HTML/HTTP interpreter (lynx), and server side code. Lynx is more like an interpreter (perl, java, etc), than a static data viewer or editor (more, less, emacs, vi).
How do interpreters handle locales? In general, they convert the system's locale into a form that can be accessed from the interpreted programming language. Some languages have locale APIs that are very similar to Unix (Perl). Others, like Java, have cross-platform APIs that require greater conversion.
HTTP's Accept-Language "API" is very foreign, but a basic locale setting can be converted. Of course, the settings should be fully customizable.
Some illustrative examples:Given that myprog.pl is an multilingual Perl script, then the following will display myprog messages in Japanese:
export LANG=ja perl myprog.plGive that Google.com is a multilingual web site, then the following should display with Google's Japanese messages (modulo custom settings):
export LANG=ja lynx http://google.comLike myprog.pl, http://google.com is a kind of program - a web app. Like any multilingual program, I would expect it to honor system language settings.
- Chuck
[Prev in Thread] | Current Thread | [Next in Thread] |