0

I am going to be working on a mysql web app to add support for multiple languages.

The application was never originally designed with multiple languages in mind.

The basic table structure of the existing content looks something like this:

TABLE documents id title body 

My thought was to just add more columns to the table for languages as needed:

TABLE documents id title_english body_english title_french body_french etc 

However I have not worked on localization before, so before I go too far down this road, I am wondering what others think of this approach. Is this a feasible way of structuring the database for localization? Are there drawbacks to this approach? Should I be breaking each language out into a separate table instead?

1 Answer 1

1

It would be better to have structure something like this:

TABLE document_in_language id document_id (FK to documents table) language title body etc. 

There would be a unique composite index on (document_id, language). The documents table would only contain the language-agnostic attributes, such as the author.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.