[WM] multi language support?

Justin Mason jm.jmason.org
Thu Nov 8 01:49:03 GMT 2001


Chris said:

> Sounds good. What about the concept of "main url"? I didn't quiet understand
> what this meant. Am I right that this is the URL I get with
> "content_object->get_url()" ?

Yep, that's the "main url" concept. (I should come up with a better name
though).

> When we have multiple languages then we have
> more than one URL for each content. Is this a problem? Does this have any
> impact on other things? 

Yep -- that's true.  But I need to fix that anyway (for printable pages
etc.).

I was considering this: adding "output sets", so that a set of <out>
blocks are grouped together as a related set.  Then the "main url"
for a page, is the url it appears in that set; regardless of where
it appears for other sets.

> Another idea besides introducing that specieal character "!" might be to have
> another attribute for the meta tags (e.g. lang :-). What do you think?

makes sense -- but I would suggest turning it into a suffix to the
metadata-name string, internally.  You could for example convert

	<wmmeta name=title value="foo" lang=en />

into a metadata content item with a key (ie. name string) of
'foo.title##LANG=en'  (also a copy called 'this.title##LANG=en' as well),
internally.

Also you would need to keep copies called 'foo.title' (as before).

> I would like to add this to webmake. Can you give me (again) some hints on
> where to start? Where is the inference of the $[this.title] variables done?
> Where is the parsing of the <wmmeta > tags done? I know I should be able to
> deduce from the librrary filenames and the code. But maybe you can guide me
> :-).

Sure!  the expansion of the variables is in Main.pm (follow it from the
subst() methods) -- and the wmmeta tags are loaded in NormalContent.pm.
BTW it would need to be added to metatable support, in Metadata.pm as
well.

The metadata loading and subst'ing code is a little messy at the moment
I'm afraid.  For example there's a couple of methods called something like
get_metadata(), where one is for loading from wmmeta tags, and one is for
finding the MetadataContent object, or something like that.  So it might
be a bit confusing.  If you run into trouble, feel free to mail me.  But
go for it!

cheers,

--j.




More information about the Webmake-talk mailing list