incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murray Altheim <murra...@altheim.com>
Subject Re: Localization
Date Wed, 23 Jan 2008 10:21:50 GMT
Janne Jalkanen wrote:
> 
> Murray,
> 
> you're reading my mind ;-)

A scary notion for either of us I'm sure. :-)

> I was thinking though about having a link between the localized 
> versions.  This is simply because the page name would have to also 
> change between language to language, and I'm not sure whether it's worth 
> the while to dissociate the page URL from the page name, as the URL 
> needs to be accessible through the localized name as well ("What do you 
> mean I have to link to TextFormattingRules when the page is clearly 
> called "Tekstinmuokkauss��nn�t?")

Yes, I'd kinda gathered that was the problem as well. In my own code
I recently (i.e., since December) added a new "object identifier" to
all documents in my stored database, which follows a collection model.

So, every document has a document or node ID (nid), a collection ID
(cid), and a unique object ID (oid). The latter never changes, even
if the document is moved from collection to collection. The oid is
generated from a base 64 ([A-Za-z0-9_-]) hash of a singleton class
that grabs 10ms-delayed snaps of System.currentTimeMillis(), so no
two oids are ever the same. The class generates only proper XML Names.

When I use this database structure to support the XNodeProvider
implementation of WikiPageProvider, I use the cid for the wiki appname
and the nid for the wiki page name. This is why I've been barking about
wiki page names being proper XML Names.

I'm thinking that the way to handle this with wiki page names is to
use the oid as the canonical page identifier, with wiki page names
as localized titles (Dublin Core 'DC.title') properties.

> Properties cannot be added to properties.  But you could use siblings 
> with same name, or some other tree structure.

That kinda sucks, since there's potentially a lot of places where adding
a l10n attribute to a property would be handy.

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Mime
View raw message