Hi, I want to create dm plugin to support model translation. It should be flexible to support adding many languages without changes in database and possibly without adding additional tables.
I think about one of two approaches: 1. Self referential many to many. For example I have Article model. article has many translations which are articles joined with articles with n..n. In that case when I do article.translations I should get all articles that are translations of that specific article. 2. Create translations table which will hold specific translations and translated_fields table that will hold specific fields. Fields to translate are in my case strings and texts (who wants to translate float anyway? :) It would look like: article has many translations translation has many translated_fields translation belongs_to tranlateable (polymorphic association). If I want to get specific translation of one of fields I must get translation and all the fields associated with it. Which approach is better for you? Which would you choose? Or maybe some better idea? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
