質問

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