[orm-devel] How to handle multi language?

Diedrich Vorberg diedrich at tux4web.de
Wed Jun 22 20:52:10 CEST 2005


Hi Ross,

> SELECT COALESCE(gr_tran,fr_tran,en_tran) as txt FROM texts WHERE txtid 
> = 123;
to do this, an expression column comes in handy. It's probably a good 
idea to define a column class, which is a subclass of text (or rather 
Unicode) that takes a tuple of column names as an attribute and maps 
them to COALESCE() calls.

Diedrich

-- 
Diedrich Vorberg <diedrich at tux4web.de>      .---.   /             \
http://tux4web.de Tel: 02302 425269        /     \ ((__-^^-,-^^-__))
                                            \.O-O./  `-_---' `---_-'
"Unix is simple, but it takes a genius     /`\_/`\   `--|o` 'o|--'
to understand the simplicity."            //  _  \\     \  `  /
                       - Dennis Ritchie   | \     )|_     ): :(
                                         /`\_`>  <_/ \    :o_o:
      Associate Member of the FSF #1245  \__/'---'\__/     "-"



More information about the orm-devel mailing list