I am trying to design a structure translate(en -> fr) for all system.
my database :
translates(id,table,key_for_search,column_to_translate,lang,translate)
id | table | key_for_search | column_to_translate | lang | translate
1 | posts | 2 | title | en | hello
2 | posts | 2 | title | sp | hola
add translate to new table or when exists is possible.
this way is good ?
Perhaps a simpler table:
xidcould be anINTand you simply ask for another entry. Or it could be a short string. Or it could be the English version.You would need
and you might need this to avoid dups:
Now... Think through the dataflow and what
INSERTsandSELECTsyou will need. You may have more questions.(Update):