ian at hixie.ch
Wed Jun 30 08:12:05 PDT 2004
On Tue, 29 Jun 2004, Gytis Jakutonis wrote:
> is there any ideas how to handle localization issues in web apps? In
> many cases we need either to handle localization on server side by
> filling page templates with proper (localized) text, or maintain several
> site versions for each supported language (or locale). If we do not use
> server side page processing (jsp, cgi etc.), then maybe localization
> problem may be solved by extending html features. Some sort of 'locale'
> attribute or additional resource files may be used to specify localized
> html items or localized resources to be used by html items.
There are two separate issues here; managing translations, and l10n of
Let's deal with translations first.
There are basically three options. First, include all the translations in
the application, and send that to every user, allowing the user agent to
pick the language somehow. Second, include a primary translation in the
file, and link to all the others as alternatives, letting the UA pick the
alternative it wants. Third, let the server serve different versions as
requested by the user agent. (There are also some other options like what
XForms does, but those aren't backwards compatible at all so we won't
consider them here.)
The first way, including all translations, is difficult to get working
right in terms of backwards compatibility, and is a huge waste of
bandwidth. So that's out.
The second way means all legacy UAs get the same language, and only modern
UAs can get the translations. Not acceptable to most people.
The third way already works, doesn't require scripting on either the
server nor the client, and only transmits the very minimum necessary.
So I think server-side content negotiation based on Accept-Language
headers is the solution we should use for translation.
The second issue is localisation of data formats. I agree this needs to be
done client-side. We'll probably have some way to do that either in Web
Apps 1.0 or Web Forms 3.0.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg