Ruby on Rails Saturday, May 1, 2010

I am building a Web service that will provide content for different
client via Rest API.

currently I have: content has_many :keys (since many keys can
reference the same content)
content table has only one field - text
keys table has name and content_id

example for key: help_about
example for content: "This website is for blablabla.."

I want to add support for translations.
is it reasonable to store the content in separate table for each
language?
for example - content_english, content_spanish, etc.
If it is, how will rails handle it? currently Content.find 1 will
return the text of contents table.
and I will need to tell rails to grab it from content_english or
content_spanish.

btw, I looked at a gettext example and it uses only one table with
locale field to determine what language to show. but I am not sure
it's a good solution for massive chunk of content and many languages.


Thanks!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment