If you develop a multilingual website your most likely will have to translate your content as well (not just the interface with the normal I18N mechanisms). One way of doing that is to partition our all translatable attributes from a table out to another table. The ActiveRecord pattern breaks as soon as you partition the tables.
Let's say I have a table product and product_trans, in product I store all locale aware attributes like price, sizes etc, while in product_trans I store name, description etc.
It may be a solution to create a MultilingualActiveRecord class which extends CActiveRecord and are able to assemble a localized version of the Product instance based on a provided locale.
Anyone doing this already? Maybe this is such a general feature that it could be supported in the framework?
Any other ideas to accomplish the same result?
Let's say I have a table product and product_trans, in product I store all locale aware attributes like price, sizes etc, while in product_trans I store name, description etc.
It may be a solution to create a MultilingualActiveRecord class which extends CActiveRecord and are able to assemble a localized version of the Product instance based on a provided locale.
Anyone doing this already? Maybe this is such a general feature that it could be supported in the framework?
Any other ideas to accomplish the same result?