6
I already have a system developed, using several tables in the database.
I have to start migrating the same to the english and spaniard.
The development part I have an idea already (not total), but do not know how to leave in the database.
What I’m thinking of doing:
A table of produtos
, for example, I have the fields id
and name
. I’m thinking of changing the field name
for name_pt
and add two more fields: name_en
and name_es
.
In this case I will keep the table with the following fields: id
, name_pt
, name_en
, name_es
. I realize that I will also have to change the system to input data to have these new input fields, apart from a few other points.
I wonder if this is the right way or if there’s some better way to take care of it?
I don’t know if it interferes with something, but the system is being developed in PHP with Codeigniter and Mysql.
As for the refactoring part of the system I’ve thought about and tried to calculate the amount of hours with a fat (to have a little idea have 22 models). Now what would an example of this table of "expressions" look like? And yes, there is a lot of work. Valew
– Marcelo Diniz
The table depends a lot on what you want. let’s say you have three languages so you have a column to take the id of that language. The expression id usually I leave a char(n) n between 3 and 7, which gives I use a mnemonic as id facilitating. Also cool is to make a helper to fetch the correct string. From here you can use something: Exphelper("ASKDOWNFILE", 3) that would be something take the expression "Do you want to download the file: {0}?" in Spanish from the bank.
– jean