You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Jörn Nettingsmeier <po...@uni-duisburg.de> on 2006/02/11 19:07:29 UTC
i18n and templating again...
hi *!
i'm trying to add templating support to the i18n transformer, and (as
always) i'm totally lost.
the behaviour i'd like to see is:
* parse the global cmsui_<locale>.xml
* recursively parse all template catalogues, overriding any previously
declared keys.
* parse the current publication's catalogue, again overriding any
previously declared keys.
as a starting point, i chose lenya/resources/i18n/catalogue.xsp.
i've been reading FallbackSourceFactory to find out how to enumerate
templates, but no luck. all this "inversion of control" stuff turns my
brain inside out.
(a java newbie question here: in catalogue.xsp, i see the declaration
"final Source pubCatalogue = ..." and later on there's a call to
pubCatalogue.getURI(), which is not part of the Source interface. how
does this work? what if the returned Source object does not implement
this method?)
iiuc, the easiest solution would be a new source factory
"fallback-merge://" for i18n.xmap that will concatenate files in the
manner described above, and then an xslt that further defines the
overriding semantics (last one wins in this case, but there may be other
usages where entries could be combined or the first one wins..)
such a source factory would also help to implement more fine-grained
templating on the element level (as opposed to the file level that we
currently have). for instance, i would not have to create a whole new
publication.xconf, only those parts that actually change wrt the template.
what do you think?
is anyone working on this atm? it's really critical for me, since i rely
on both templating and i18n quite a bit, and i can't use a global catalogue.
best,
jörn
--
"Open source takes the bullshit out of software."
- Charles Ferguson on TechnologyReview.com
--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-duisburg.de, Telefon: 0203/379-2736
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org