From: | "Adrian Maier" <adrian(dot)maier(at)gmail(dot)com> |
---|---|
To: | "Elim Qiu" <elim(dot)qiu(at)gmail(dot)com> |
Cc: | pgsql-www(at)postgresql(dot)org |
Subject: | Re: multi-language web application: is it possible? |
Date: | 2007-05-04 17:12:09 |
Message-ID: | cd30ef8c0705041012racfd83dtac53de847e431c39@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-www |
On 5/4/07, Elim Qiu <elim(dot)qiu(at)gmail(dot)com> wrote:
>
> 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 = 'A' and b5_first_name = '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.
>
> Any suggestions? Any web application known to be able to solve the problem?
> Thanks
Elim,
the pgsql-www mailing list is dedicated to discussions regarding the PostgreSQL
website , and not to discussions about developing web applications.
I've noticed
that you've sent the email to pgsql-general as well . pgsql-general
is probably a
better place for asking your question .
Best wishes,
Adrian Maier
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Frysinger | 2007-05-04 17:18:09 | Re: cant get pg_dump/pg_restore to behave |
Previous Message | Josh Berkus | 2007-05-04 17:11:42 | Re: Feature Request --- was: PostgreSQL Performance Tuning |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Treat | 2007-05-04 18:24:21 | Re: Feature freeze progress report |
Previous Message | Adrian Maier | 2007-05-04 16:56:09 | Re: The template/en/about/features.html file |