Schema for a multilanguage database

What do you think about having a related translation table for each translatable table?

CREATE TABLE T_PRODUCT (pr_id int, PRICE NUMBER(18, 2))

CREATE TABLE T_PRODUCT_tr (pr_id INT FK, languagecode varchar, pr_name text, pr_descr text)

This way if you have multiple translatable column it would only require a single join to get it + since you are not autogenerating a translationid it may be easier to import items together with their related translations.

The negative side of this is that if you have a complex language fallback mechanism you may need to implement that for each translation table – if you are relying on some stored procedure to do that. If you do that from the app this will probably not be a problem.

Let me know what you think – I am also about to make a decision on this for our next application.
So far we have used your 3rd type.

Leave a Comment