Henri Bergius wrote:
>
> > Yes, I suggested the same idea some time ago. This modification at the
> > database level will require also changes in mod_midgard in order to
> > allow dynamical rewritting of URI that will be processed by Midgard
> > engine (http://LC/path -> http://path and setting up special field
> > 'language' in $midgard system variable). In such situation we'll get
> > system that automatically selects right content from database using
> > $midgard->language field as a language ID.
>
> This plan sounds good, we will need a way of supporting
> multi-lingual sites in Midgard. However, having a hard
> coded path for setting the locale would be a bit against
> how Midgard usually works.
Nothing exceptional - if you want to support multi-lingual sites, then
set MidgardMultiLang option in corresponding virtual host (or even
location) in Apache's httpd.conf to On. Then mod_midgard will strip
first directory and use it as language code. Other part of path will be
forwarded to mod_midgard's walking functions. If you don't want to use
multi-lingual sites, just set MidgardMultiLang to off (I think that it
should be disabled by default).
> A better way to set the $midgard->locale variable could
> be to have a function and set the variable in code-init.
> This way the site developer could decide what kind of
> system for determining the locale he wants to use. Whether
> it comes from an URI parameter, user preference, browser
> preference or whatever.
It'll create unnecessary complexity.
Saving locale preference as URI will add another feature: if one want to
get, for example, German translation of interested article, he/she just
replaces only first element in path (it could be done via pull-down menu
on the page) and nothing else. (Of course, if site is supporting German
version). Also old browsers will work without problems too.
As for browser preferences, there is another issue. Netscape
Communicator, for example, has 'en' by default even in many localized
versions, and many international users don't change this setting at all
(many of them even don't know about it). Automatically selecting site
version by Preffered language: field in header will work bad in this
situation.
> Setting this up shouldn't be at all harder than the URI
> system proposed. And as code-init is parsed before anything
> is sent back to browser it shouldn't cause any problems
> with character sets either.
You can always add redirection Header("Location: http://site/LC/\n\n");
in code-init according described before set of preferences.
--
Sincerely yours,
Alexander Bokovoy
<!-- 2:450/144.58 --- bokovoyATminsk.lug.net --- FractalsAtTheEdge -->
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]