[orm-devel] How to handle multi language?

Werner F. Bruhin werner.bruhin at free.fr
Thu Jun 23 12:41:02 CEST 2005

Hi Ross and Diedrich,

Diedrich Vorberg wrote:

> 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.
Why are you both leaning to the column per language approach instead of 
a row per language approach (txtid, langid, text).

I have the following concerns/problems with the column per language 
- Requires table restructure for new language
- Potentially large row, currently I only support three languages, so no 
big deal, but I see systems with many more languages.

I only see the following concern/problem with the row per language 
approach are:
- Potentially multiple SELECTS if preferred language is not found

Thanks to both of you for taking the time to think about this problem.

See you

More information about the orm-devel mailing list