forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: Multilanguage sites
Date Mon, 25 Aug 2003 10:16:12 GMT
On Mon, Aug 25, 2003 at 12:02:05PM +0300, Corneanu Dan wrote:
> Jeff Turner wrote:
> 
> >How about having separate directories for each language?
> >
> >src/documentation/content/xdocs/en/*.xml
> >src/documentation/content/xdocs/de/*.xml
> >src/documentation/content/xdocs/fr/*.xml
> >...
> > 
> >
> This is a good idea. There is only one thing bothering me and this is 
> having multiple site.xml + tabs.xml files, one in every language folder 
> (src/documentation/content/xdocs/{en|de|fr}/site.xml etc.), all having 
> the same content only some labels being translated. But I think this 
> could be solved by an ant script that will prepare the 
> {en|de|fr}/site.xml + {en|de|fr}/tabs.xml files for every language using 
> a single site.xml + tabs.xml as source (endorsed with some translation 
> information), before actually running forrest.

Instead of having multiple site.xml's, you could have one with multiple
labels:

<site>
  <index href="index.html">
    <label xml:lang="en">Index</label>
    <label xml:lang="fr">l'index</label>
    ...
  </index>

Anything is possible with some XSLT and sitemap hacking.  For example,
RDF:

<rdf:RDF
  xml:base=""
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://apache.org/forrest/metadata/1.0#"
  xmlns:dc="http://purl.org/dc/elements/1.1/#">

  <folder rdf:ID="/" about=".">
    <file rdf:ID="index"
      dc:Source="index.xml"
      dc:Description="Forrest home page"
      dc:Creator="Various"
      dc:Format="text/xml"
      href="index.html">
      <dc:Title>
        <rdf:Alt>
          <rdf:li xml:lang="en">Index</rdf:li>
          <rdf:li xml:lang="de">Das Index :)</rdf:li>
        </rdf:Alt>
      </dc:Title>
    </file>
  </folder>
</rdf:RDF>


--Jeff

> 
> I will try the solution you proposed and see how it feels.
> 
> Also in the meantime I managed to put up a solution
> based on the structure I first proposed and I'm thinking of using the 
> i18n module for menus and tabs translation.
> 
> Dan.
> 

Mime
View raw message