This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] How To Build A Multi-lingual Website With Website


Oliver Boris Fischer wrote:

Hello,

I someone is here, how knows how to set up a multi-lingual website with help of Website DTD?



We plan to do this for our site. Currently the site is only in Bulgarian but it will be translated in English, French and Russian.

We plan to do this the following way. Every translation will be placed
in separate directory - bg/ ru/ en/ fr/. And every translation will be
maintained separately - with separate layout.xml, Makefile etc.

We'll just add a template to the xslt stylesheet to make the link
between the different translations. If you have the same structure with
the same filenames something like this in the customization layer will
do the job:

<xsl:template name="home.navhead.upperright">
   <a>
      <xsl:attribuet name="href">
         <xsl:variable name="tocentry" select="$autolayout//*[@id=@id]"/>

         <xsl:call-template name="root-rel-path"/>
         <xsl:text>ru/</xsl:text>
         <xsl:value-of select="$tocentry/@dir"/>
         <xsl:value-of select="$tocentry/@filename"/>
       </xsl:attribute>
      <xsl:text>ru</xsl:text>
   </a>
   <xsl:text>&#160;</xsl:text>
   <a>
      <xsl:attribuet name="href">
         <xsl:variable name="tocentry" select="$autolayout//*[@id=@id]"/>

         <xsl:call-template name="root-rel-path"/>
         <xsl:text>de/</xsl:text>
         <xsl:value-of select="$tocentry/@dir"/>
         <xsl:value-of select="$tocentry/@filename"/>
       </xsl:attribute>
      <xsl:text>de</xsl:text>
   </a>
</xsl:template>


I didn't tested this but I hope it ilustrates the idea. It may need some improvements and optimizations to.

I'm also interested to hear another opinions if there is better way to
make a multilingual site.


-- Andrei Boyanov CEO of Active Solutions Ltd. http://activesolutions.bg; http://andrei.activesolutions.bg





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]