I've tried to improve the cross language links (currently 2.1 only, see httpd.apache.org/docs-2.1/). The attached patch adds a hreflang attribute to the links (at least gecko browsers do evaluate it) and adds a title attribute which displays the native name of the language.
Note that the particular langname attributes in the $lang.xml files should contain the native name then for this purpose (e.g. "Deutsch" for German). This works fine with the browsers - if the output encoding cannot represent the native language name, the chars are transformed to character references (&#xxx;). In the worst case (no appropriate font installed) it would be displayed as question marks or something, I'd guess. Opinions? nd -- sub the($){+shift} sub answer (){ord q [* It is always 42! *] } print the answer # André Malo # http://pub.perlig.de/ #
Index: lang/de.xml =================================================================== RCS file: /home/cvs/httpd-2.0/docs/manual/style/lang/de.xml,v retrieving revision 1.12 diff -u -r1.12 de.xml --- lang/de.xml 17 May 2003 13:37:27 -0000 1.12 +++ lang/de.xml 17 May 2003 14:37:36 -0000 @@ -8,7 +8,7 @@ <!-- Some strings might be used in other contexts, than stated in the --> <!-- comments... --> -<messages lang="de"> +<messages lang="de" langname="Deutsch"> <!-- Used for the moduleindex --> <message name="corefeatures">Kernfunktionen und Multi-Processing-Module</message> <message name="othermodules">Andere Module</message> Index: lang/en.xml =================================================================== RCS file: /home/cvs/httpd-2.0/docs/manual/style/lang/en.xml,v retrieving revision 1.11 diff -u -r1.11 en.xml --- lang/en.xml 1 May 2003 22:54:35 -0000 1.11 +++ lang/en.xml 17 May 2003 14:37:36 -0000 @@ -7,7 +7,7 @@ <!-- Some strings might be used in other contexts, than stated in the --> <!-- comments... --> -<messages lang="en"> +<messages lang="en" langname="English"> <!-- Used for the moduleindex --> <message name="corefeatures">Core Features and Multi-Processing Modules</message> <message name="othermodules">Other Modules</message> Index: lang/ja.xml =================================================================== RCS file: /home/cvs/httpd-2.0/docs/manual/style/lang/ja.xml,v retrieving revision 1.10 diff -u -r1.10 ja.xml --- lang/ja.xml 1 May 2003 22:54:35 -0000 1.10 +++ lang/ja.xml 17 May 2003 14:37:36 -0000 @@ -8,7 +8,7 @@ <!-- Some strings might be used in other contexts, than stated in the --> <!-- comments... --> -<messages lang="ja"> +<messages lang="ja" langname="Japanese"> <!-- Used for the moduleindex --> <message name="corefeatures">$B%3%"5!G=$H(B MPM</message> <message name="othermodules">$BB>$N%b%8%e!<%k(B</message> Index: lang/ko.xml =================================================================== RCS file: /home/cvs/httpd-2.0/docs/manual/style/lang/ko.xml,v retrieving revision 1.1 diff -u -r1.1 ko.xml --- lang/ko.xml 10 May 2003 15:05:36 -0000 1.1 +++ lang/ko.xml 17 May 2003 14:37:36 -0000 @@ -8,7 +8,7 @@ <!-- Some strings might be used in other contexts, than stated in the --> <!-- comments... --> -<messages lang="ko"> +<messages lang="ko" langname="Korean"> <!-- Used for the moduleindex --> <message name="corefeatures">ÇÙ½É ±â´É°ú ´ÙÁßó¸® ¸ðµâ</message> <message name="othermodules">´Ù¸¥ ¸ðµâ</message> Index: lang/ru.xml =================================================================== RCS file: /home/cvs/httpd-2.0/docs/manual/style/lang/ru.xml,v retrieving revision 1.5 diff -u -r1.5 ru.xml --- lang/ru.xml 1 May 2003 22:54:35 -0000 1.5 +++ lang/ru.xml 17 May 2003 14:37:36 -0000 @@ -8,7 +8,7 @@ <!-- Some strings might be used in other contexts, than stated in the --> <!-- comments... --> -<messages lang="ru"> +<messages lang="ru" langname="Russian"> <!-- Used for the moduleindex --> <message name="corefeatures">ïÓÏÂÅÎÎÏÓÔÉ ÑÄÒÁ É ÍÕÌØÔÉ-ÐÒÏÃÅÓÓÎÙÅ ÍÏÄÕÌÉ</message> <message name="othermodules">äÒÕÇÉÅ ÍÏÄÕÌÉ</message> Index: xsl/common.xsl =================================================================== RCS file: /home/cvs/httpd-2.0/docs/manual/style/xsl/common.xsl,v retrieving revision 1.33 diff -u -r1.33 common.xsl --- xsl/common.xsl 2 May 2003 19:53:31 -0000 1.33 +++ xsl/common.xsl 17 May 2003 14:37:37 -0000 @@ -318,13 +318,25 @@ <xsl:for-each select="$metafile/variants/variant"> <xsl:sort select="." /> - <a href="{$path}/{.}{$metafile/path}{$metafile/basename}.html"> + <a hreflang="{.}" + href="{$path}/{.}{$metafile/path}{$metafile/basename}.html"> <xsl:if test="$metafile/basename = 'index'"> <xsl:attribute name="href"> <xsl:value-of select="concat($path, '/', ., $metafile/path)" /> </xsl:attribute> </xsl:if> + <xsl:attribute name="title"> + <xsl:choose> + <xsl:when test=". != 'fr'"> <!-- no language file avail. --> + <xsl:value-of select="document(concat('../lang/', ., '.xml')) + /messages/@langname" /> + </xsl:when> + <xsl:otherwise> + <xsl:text>Français</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> <xsl:value-of select="." />
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]