the problem is to display all the records for a model based on choosen langauge
I did this already in my app but I did it all wrong. For ex:
news model
I have fields title and content for each language, and I have 8 languages that means 16 fields in a table, this is WRONG.
I am thinking to rebuild the database as it’s not late yet and now I have
news model with :title :content and :language_id so the user will fill in only 3 fields and not 16 and he will choose what language to assign to this article.
based on this, I need somehow to display all records so that current_language matches with language_id
so in controllers I have to change the def index and def show
@news = News.order('id desc').paginate(:page => params[:page], :per_page => 3)
in index I must point somehow to find all records with language_id == current_language
how can I make this working? Thank you very much
http://railscasts.com/episodes/338-globalize3. A great solution for creating translations, easy and working nice. https://github.com/svenfuchs/globalize3