I'm trying to design some tables to store some data, which has to be converted to different languages later. Can anybody provide some "best practices" or guidelines for this?
Thanks
THERE ARE FOUR METHODS THAT ARE USED TO LOCALIZE DATABASES: Row localization – copies the original row for each language. Field localization – updates the values of the localized fields. Table localization – adds new language tables for each table. Database cloning – creates a copy of the database for each language.
Answer and Explanation: Storing all data in one single table will be confusing, may have security issues and there will be duplication in recording.
Relational model. Network model. Object-oriented database model. Entity-relationship model.
Finally, you shouldn't store credit card information in your database unless you absolutely need to. This includes credit card owner names, numbers, CVV numbers, and expiration dates.
Let's say you have a products table that looks like this:
Products
----------
id
price
Products_Translations
----------------------
product_id
locale
name
description
Then you just join on product_id = product.id and where locale='en-US'
of course this has an impact on performance, since you now need a join to get the name and description, but it allows any number of locales later on.
Can you describe the nature of the 'dynamic data'?
One way to implement this would be to have 3 different tables:
[1, English], [2, Spanish]
[1, 'Data1'], [2, 'Data2']
So: [Data_Language, Data_Definition, Language, Translation] [1, 1, 1, 'Red'] [2, 1, 2, 'Rojo'] [3, 2, 1, 'Green'] [4, 2, 2, 'Verde'] etc ...
When the dynamic data is entered create the default 'English' record and then translate at your leisure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With