2009年1月27日星期二

[fw-db] Multilingual db models

Hi guys,

i started to solve multilingual db models and i am finding the best
practise.

My model looks http://www.walk.cz/download/vicejazycnost.png
http://www.walk.cz/download/vicejazycnost.png .

It means in my case I will use in ZF views categories_cs and categories_en
only.

In ZF I have to have 2 models:

class CategoriesCs extends Zend_Db_Table {}
class CategoriesEn extends Zend_Db_Table {}

But here I have 2 problems:

a) redundant code in both models (could be solved by inheritance, but
extending is evil, probably could be solved by any design pattern, but I
dont know which to use)
b) how to easily create model instance for current language? (the best way
is imho Factory pattern, but where should be the Factory?)
--
View this message in context: http://www.nabble.com/Multilingual-db-models-tp21682995p21682995.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: