[Zope-DB] Modelling & presentation question
Charlie Clark
charlie@begeistert.org
Thu, 05 Dec 2002 14:44:38 +0100
Dear list,
I'd suggestions as the best way to do the following:
In German job descriptions are gender specific, in English you only have
this with actor/actress. I'd like to be able to offer users a pull-down
with the masculine description. What's the best way of doing this - I'm
sure it's a common problem.
I've thought about the following solution: an additional column for the
"alternative" description and doing a gender check to select the value from
the appropriate column. Somthing like
pseudo code:
if gender == m:
job = qJob().[0].value
else:
job = qJob().[0].alternative
I guess this is correct way to do this assuming this only presentation
information. But seeing as I already have the information in the database I
would like to be able to do this directly in a query.
Ideas?
Thanx
Charlie