문제

I have this simple database driven website and it has tables such as this,

article table,

id   title   url       content
1    Hello   hello     bla bla bla

this table keeps the English version's data only.

but now I need to create a French version for my website, what should I do with my tables for storing French version's data?

Do I have to duplicate the tables such as article table for storing French data?

Any suggestions in handling database for making a multi-languages website?

도움이 되었습니까?

해결책

My suggestion is create a table for languages. In this table you will add many languages. In the table article you will add a id for a language and of course you will duplicate all data in this table with the French values.

Be careful to not miss any information. It means if you have values just in En and you entry into the site in Fr you will get a exception.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top