Preliminary Localization of XHTML into Chinese

Greetings all,

I am not sure whether this may have been done before (I'd be surprised 
if it hadn't), but since I haven't heard of it, here it goes...

I wrote a preliminary XML language using Chinese characters to represent 
the elements, attributes, and specified attribute values of XHTML--no 
DTD or XML Schema yet--to be transformed by a XSLT sheet that I devised 
(with translation help from my wife) into XHTML (or a modular variety 
thereof). It manages to work fine (with a few nuances depending on 
whether viewing in Explorer or Firefox), at least for the relatively 
small files I've tested it on.

I am sure that the translations must not be wholly suitable (my wife is 
just a beginner in X/HTML and my own Chinese is quite limited) and even 
my XSL stylesheet may have a few shortcomings, but I figure it is a 
beginning, if no such language already exists.

I have also designed one version of the stylesheet with entities, so it 
can be easily localized into other languages (another version is without 
entities so that it will work with more server-side transformation 
software like PHP5's XSL extension).

I would also like to see CSS and possibly even a decent feature set of 
Javascript and PHP made into a localized XML representation which could 
then be transformed into actual CSS (or Javascript, PHP, etc.). Even 
with English there would be its special uses (easily styling the files 
(e.g., code-folding on XHTML-displayed versioning like online Subversion 
repositories), translating from one computer language to another, etc.).

You can see an example of this "Chinese XHTML" at . If you 
"view->source" for this file in Explorer or Firefox, you will see that 
the code is in fact all Chinese (our translation may be inadequate, but 
we can change that).

XSL can also be used on the server to make the translation into English 
code before it comes to the visitor. You can go to and you can see 
when you view the source, that the page has been converted to English 
(though the content is still Chinese).

You can see the XSL translating file itself at or . (For Explorer, I am 
guessing because of an error in it, we have to send GB2312 unless we 
change it on the server first, even though UTF-8 would be better). If 
you go to the former file and view its source, you can see in 
alphabetical order exactly how we translated each English word into 
Chinese. This file will be useful even to translate into other 
languages, but it doesn't usually work as well if it is transformed on 
the server, so that is why I have the other XSL file (which I created 
just by an easy find-and-replace script applied to the former).

(I've also started writing a little example sheet of the code at but as far as this 
file, I am just beginning on it, and it will need the notes translated 
into Chinese.)

Let me know if anyone wants to help promote this, help develop it, etc. 
I'm limited in the time I can dedicate to it, but I wanted to get it out 
there.... (The working code, for this, by the way was written in the 
Chinese code, transformed server-side by PHP5's XSL extension into the 
"English XHTML".)

Feedback is welcome!

best wishes,

Received on Monday, 5 March 2007 16:24:45 UTC