I'm currently creating a multi-lingual website, and I have different types of words that are being translated all across the website. However, whats the best practice when it comes to storing this in the database? This is what I currently do:
I have the language Norwegian and English.
My database looks like this:
Whenever I add a new language it get added into the languages
table like this:
At the same time a new table will be created with looking like this language_en
. Using the value in language_val
.
Later on I use URL routing to retrieve en
, no
or whatever language and fetch the website information from the correct table.
My question is, should I rather have only 1 table
and use the language_id
in this one? or is it perfectly fine to split up languages into multiple tables
?