httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Abele <e...@codefaktor.de>
Subject Re: Japanese internationalized error messages; charset in typemapfiles
Date Mon, 19 Aug 2002 19:39:06 GMT
on 19.08.2002 19:34 Uhr Joshua Slive (joshua@slive.ca) wrote:

> Hiroaki KAWAI wrote:
>> My suggestion is:
>> 1. We don't have to go with this complex including process for the part of
>> Japanese error docs. Remove all include elements (prepare preloaded files).
>> 2. We prepare include/*.var and include/*.ja.jis; use negotiation.
> 
> I'm happy with 1 or 2.
> 

We could also introduce an new variable (e.g. CONTENT_ENCODING) before
including top.html and set the correct encoding via the include/*.var's

for example:

Content-language: ja
Content-type: text/html
Body:----------ja--
<!--#set var="CONTENT_ENCODING" value="iso-2022-jp" -->
<!--#set var="TITLE" value="title to set!" -->
<!--#include virtual="include/top.html" -->
...
----------ja--

and to get it in top.html:

<!--#if expr="! $CONTENT_ENCODING" -->
<!--#set var="CONTENT_ENCODING" value="ISO-8859-1" -->
<!--#endif -->
<?xml version="1.0" encoding="<!--#echo var="CONTENT_ENCODING" -->"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title><!--#echo var="TITLE" --></title>
<meta http-equiv="Content-Type" content="text/html; <!--#echo
var="CONTENT_ENCODING" -->" />
<link rev="made" href="mailto:<!--#echo encoding="none" var="SERVER_ADMIN"
-->" />
...

If the CONTENT_ENCODING var isn't set, we could assume that the content is
ISO-8859-1 encoded. So all this wouldn't break the include-process into
different language-parts and we would have an easy solution for other
languages with the same problem.

BTW I would volunteer to do that.

What do you think? Comments appreciated...

Erik

(sorry for the above line wraps :-)


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Mime
View raw message