forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Børre Gaup <boe...@skolelinux.no>
Subject Re: Making languages available in the menu
Date Wed, 19 Jul 2006 11:39:03 GMT
Gask, suoidnemánu 19. b. 2006 13.23, Ross Gardler čálii:
> Børre Gaup wrote:
> > I have successfully managed to i18n'ize our forrest documentation, where
> > menus, tabs and content have the same language.
> >
> > I generate the different language specific sites into
> > site/build/$langname.
> >
> > Some of our pages are available in up to five languages, but most are
> > just available in one language.
> >
> > If I display a multilingual document, I would like to have a link to the
> > parallel documents in the other languages. That means, if I am looking at
> > a page displayed in norwegian, and I have that document also in english
> > and finnish, I would like to have a link to those pages also (preferrably
> > in the menu).
>
> There are a number of things you need to do here:
>
> 1) decide what language variants are available
> 2) insert a link to the available pages in the body of the document
> (like the PDF link)
> 3) insert a link into the menu
>
> For 1)
>
> You need to use the directory generator. This will give you an XML file
> continaing details of all the files in a given directory and
> sub-directories.
>
> You can find examples of its use in the resume and projectInfo plugins
> (note that you will need the latest sources for these plugins the
> samples have been added after the 0.7 release was packaged).
>
> You can find docs for the directory generator in Cocoon docs.
>
> For 2)
>
> Using the output of 1) you will need to enhance the skin (as you
> suspected) to insert the relevant link into the skinned pages content.
> Take a look at how the PDF link is inserted at the skinning stage. This
> will show you how to add other links to your language files when they
> are available.
>
> For 3)
>
> You will need to intercept the request for site.xml and dynamically
> insert the relevant nodes for the available languages. Again, you will
> need to use the output of 1). There are some examples of how to do this
> in both the resume and projectInfo plugins (look for "site-snippet" in
> the xmap files).
>
> Ross

Ok, thank  you for the pointers. I will take a look, and report on how it 
goes.

-- 
Børre Gaup

Mime
View raw message