[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    [GENERAL] Transparent i18n?
From:       "Steve - DND" <postgres () digitalnothing ! com>
Date:       2005-06-30 23:16:01
Message-ID: LDEHKBBOEMIJKHKBOFNFCEKKPJAA.postgres () digitalnothing ! com
[Download RAW message or body]

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



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic