Answer the question
In order to leave comments, you need to log in
How best to implement?
Hello.
I am writing a self-written news site in PHP.
The news will be bilingual and stored in a MySQL table.
I think that it will work faster (since there will be a lot of news - speed and performance are very important). The question is how to build a table in the database where the news will be stored.
First option:
1. id | subject_ua | subject_ru | text_ua | text_ru| tags_ua | tags_ru
or the second option, to make a table in the database for each language? Or it is better to keep all the same in one table?
Guys, help with advice ...
Answer the question
In order to leave comments, you need to log in
the simplest solution (IMHO the most correct):
id | subject | text tags | lang_id | group_id
group_id will combine the same news in different languages, when switching from one language to another, you make a selection from the database by lang_id - all news in the desired language are selected.
and plate language directory
id | prefix | lang_name
1 | ru | Russian
2 | ua | Ukrainian
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question