[dokuwiki] Re: Multilingual wiki

  • From: "Esther Brunner" <wikidesign@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 1 Feb 2007 17:52:00 +0100

Hi Sander

> The language of a page can be
> determined by it's namespace and saved to $meta['language']. I
> personally would opt for lang:ns:page rather than ns:lang:page, but
> either way is possible.

Given that you correctly point out (below) that "translation" is a type of
relation, it might be wise to consider the possibility that at some point in
the future you'd want to be able to define other types of relations. Being
stuck with 'hard-coded' lang namespaces might then turn out to be a problem?

Okay, what about the following order to determine the language of a page?

1. $meta['language'] (can be set with the Meta Plugin: ~~META:language=de~~)
2. top-most namespace if it's a valid language code (e.g. de:ns:subspace:page)
3. deepest subspace if it's a valid language code (e.g. ns:subspace:de:page)
4. default language of the wiki (set in config)

-- esther
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: