From: | "Steve - DND" <postgres(at)digitalnothing(dot)com> |
---|---|
To: | "postgres-general" <pgsql-general(at)postgresql(dot)org> |
Subject: | Transparent i18n? |
Date: | 2005-06-30 23:16:01 |
Message-ID: | LDEHKBBOEMIJKHKBOFNFCEKKPJAA.postgres@digitalnothing.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I've recently been trying to implement some i18n functionality as simply as
possible into my application. I have a lot of lookup values and such in the
DB that need to be translated, and I would rather not do it in the calling
client.
A friend and I put our heads together, and came up which seemed like a
ridiculously elegant way of doing it using PGs SELECT rules, and some type
of connection "session" information. Well I got the connection session stuff
figured out thanks to Richard Huxton. Apparently though, SELECT rules can
only be used to create views and not actually modify the data returned by a
table?
I was trying to do something along the lines of a translations table, which
house all translations for a given string. My lookup tables would then
reference the specific strings they needed. I was then going to place a
SELECT rule on the lookup table that would perform a join(based off of the
lookup word, and the current session language), and return that in the field
of the lookup value.
Is my only option to use a separate view? What are some techniques the rest
of you use for storing translation info in the DB?
Thanks,
Steve
From | Date | Subject | |
---|---|---|---|
Next Message | David Pratt | 2005-07-01 00:25:45 | Re: Advice on structure /sequence / trigger |
Previous Message | MargaretGillon | 2005-06-30 23:01:25 | How to know if a TRANSACTION isn't completed |