Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 18C969FB517 for ; Fri, 4 May 2007 11:20:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 56062-06 for ; Fri, 4 May 2007 11:20:17 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by postgresql.org (Postfix) with ESMTP id 795639FB468 for ; Fri, 4 May 2007 11:20:17 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id a73so719660pye for ; Fri, 04 May 2007 07:20:16 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:from:to:subject:date:mime-version:content-type:x-priority:x-msmail-priority:x-mailer:x-mimeole; b=DSymqyyCL6oBDbDguTZyjJF/vpb9vNQIgzgA3+T0jzJ+uWAoQjpa/zUlAxyeAuKE8rhBQgHGXSPjXSfG8fVnit3PB45zAIxXSfMu4+nO0Z1JWK17twscngOb5uWh8qi8jfLx858bo2WHytJgTKXScs0UjGN1haPcJsFWnG/HnYE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:from:to:subject:date:mime-version:content-type:x-priority:x-msmail-priority:x-mailer:x-mimeole; b=InxhgznSqXjlMuDgedrImapfO04h7syZplm+Xog+fZvAbBdRSpRR8aH+RNR0zJuJvWX/Xt4h/DSw2OJJgihqihGUsMPflWm9X/xDwm8K4cCbMuDZjo2hR59OO7XU9q28TjPa+N8sFLiQs7+zBNo6NvkTxzJWOtyDuqCvabTOQ3w= Received: by 10.35.110.13 with SMTP id n13mr5321311pym.1178288416113; Fri, 04 May 2007 07:20:16 -0700 (PDT) Received: from grace ( [63.150.171.249]) by mx.google.com with ESMTP id x56sm7008738pyg.2007.05.04.07.20.13; Fri, 04 May 2007 07:20:15 -0700 (PDT) Message-ID: <01ce01c78e57$5a071120$6400a8c0@grace> From: "Elim Qiu" To: , Subject: multi-language web application: is it possible? Date: Fri, 4 May 2007 08:20:20 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01CB_01C78E25.0E059710" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/12 X-Sequence-Number: 11946 This is a multi-part message in MIME format. ------=_NextPart_000_01CB_01C78E25.0E059710 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable I have many tables like the table Person:below, in mysql database. person_id, first_name,last_name, mi, gb_first_name, gb_last_name, = b5_first_name, b5_last_name, gender, dob where different columns storing strings in different encodings. At = anytime, a web user can switch the language and the application will get = the values in the right columns to generate web pages. The purpose of = Multi-language tables is to make multilanguage dynamic content = management easier for web applications. For example, to add a person = record, the user enter the English name, then switch the session = language to gb2312, enter the Chinese name in gb2312, and then switch = the session language to big5, enter the name in big5. And then commit = the data into the database. The whole thing sounds complicated but can = be treated as a pattern and let a framework to take care of those and = the code can be as clean as a single language app. I actually have the = framework that works well for me with mysql database. I'm trying to port the app to pgsql database but got trouble doing so. I = can read and set a row with multiple languages (in some paricular = cases), but cannot do queries like (gb_first_name =3D 'A' and = b5_first_name =3D 'B') with A a gb2312 string, B a big5 string. The = tables are of unicode encoded, and the dbclient encoding is set to GBK. = The application's char set are selectable by user among = iso-8859-1,gb2312 and big5. I didn't do anything about language encoding in mysql database, it just = worked for me. At least with english, gb2312 and big5 altogether in a = table like table Person above. I noticed that (english, gb2312, big5, = Jp) cannot work together even in mysql database. My approach seems fine = with most western languages So after all such experimental work, I still don't know how to make a = real multi language web app such that the languages are switchable = within the same session.=20 Any suggestions? Any web application known to be able to solve the = problem? Thanks ------=_NextPart_000_01CB_01C78E25.0E059710 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable
I have many tables like the table = Person:below, in=20 mysql database.
 
person_id, first_name,last_name, mi, = gb_first_name,=20 gb_last_name, b5_first_name, b5_last_name, gender, dob
 
where different columns storing = strings in=20 different encodings. At anytime, a web user can switch the language = and the application will get the = values in the=20 right columns to generate web pages. The purpose of Multi-language = tables is=20 to make multilanguage dynamic content = management=20 easier for web applications.  For example, to add a person record, = the user=20 enter the English name, then switch the session language to gb2312, = enter the=20 Chinese name in gb2312, and then switch the session language to big5, = enter the=20 name in big5. And then commit the data into the database. The whole = thing sounds=20 complicated but can be treated as a pattern and let a framework to take = care of=20 those and the code can be as clean as a single language app. I actually = have the=20 framework that works well for me with mysql database.
 
I'm trying to port the app to pgsql = database but=20 got trouble doing so. I can read and set a row with multiple languages = (in some=20 paricular cases), but cannot do = queries=20 like  (gb_first_name =3D 'A' and b5_first_name =3D 'B') with A a = gb2312 string,=20 B a big5 string. The tables are of unicode encoded, and the dbclient = encoding is=20 set to GBK. The application's char set are selectable by user among=20 iso-8859-1,gb2312 and big5.
 
I didn't do anything about language=20 encoding in mysql database, it just worked for me. At least with=20 english, gb2312 and big5 altogether = in a table=20 like table Person above. I noticed that (english, gb2312, big5, Jp) = cannot work=20 together even in mysql database.  My approach seems fine with = most=20 western languages
 
So after all such experimental work, I = still don't=20 know how to make a real multi language web app such that = the languages=20 are switchable within the same session.
 
Any suggestions?  Any web = application known to=20 be able to solve the problem? Thanks
 
------=_NextPart_000_01CB_01C78E25.0E059710--