I cannot imagine being the first one encountering this problem but I still have not found a satisfying answer.
My PHP/MySQL/CodeIgniter application uses a MySQL database with a bunch of lookup tables for things like statusses and discrete choices. Those tables have the generic form:
table XXXXXX
id: int (PK)
description: varchar(100)
The website will be available in two languages, English and Thai. We will use a resource bundle for the static content, but what to do with the lookup values, which will in most cases shown in dropdown boxes?
My first idea is to use 2 separate description fields: description_en and description_th, and selecting the right one according to the locale stored in the session.
My co-worker tends to have all i18n values in the resource bundle, which will make the description field in the tables redundant. A table with only one PK field is nonense which would mean that the corresponding FK field will be “degraded” to an ordinary lookup key.
Or still use the lookup table in conjugation with the resource bundle, and leave the English description as a administrator reference?
The lookup tables will be mutable by the administrators only, not by the end users.
I want to make an informed decision about this, so any suggestions are welcome!
Not much feedback but sometimes just only posting a problem forces you to think about it on a deeper level…
I have used a solution which is pretty straightforward, we keep using the language files also for the lookup values. The only modificaion is that the lookup tables do not contain the actual descriptions but the lookup keys for the language files. BEcause all developsers are fluenn in English, we shoose to use English abbrevations for the description field, which is renamed to description_key.
SO I consider this issue as solved.