Reputation: 372
I'm developing a Multilingual website, and I used the following database design approach to build my data structure.
Products
===========
ID
NameResID
DescResID
Price
Resources
===========
ID
ResID
Text
LanguageID
Languages
==========
ID
LanguageName
UserLanguages
===============
ID
UserID
LanguageID
IsDefault
As far as writing the cruds, I wrote all of them, with support of languages.
Now the main issue is backend related, how to Display/Edit/Delete in a nice UI given the following scenario:
User logs on > Adds English and French... as his user languages while having English as his default language, since English is now default when the user goes to add a new product, the product is created and the resources are saved in English, perfect, now the user can change the language to french to add translations for that same product added and also the user can Add a new product in french and when I switch back to English, I can edit its translation in English as well.
What I'm doing right now (picture below) is basing everything on English, and I want to be able somehow NOT to base on English nor the default language cause even the default language can change, I thought of adding a reference name, but I didn't like that approach.
Upvotes: 0
Views: 212
Reputation: 47789
On first brush with this issue, it seems to me like you should just make the language a selectable option at the time of data entry. You can default it to whatever the user's current default language is of course, but it seems like a pain to have to go change your global language preference to enter another language.
Upvotes: 1