Forum OpenACS Development: DB vs. Flat Files

Collapse
5: DB vs. Flat Files (response to 1)
Posted by Malte Sussdorff on
A thought just jumped into my mind. What do you think about a system where we store the language information in the .adp files and use multiple .adp files depending on locale. The way I thought about it:

- We add TRN tags around text in the .adps. We do NOT tag them with a number or anything.

- We add a table which relates the original englisch text (in between the TRNs) with files in the system.

- We add to the system the possibility for locale administrators to edit the text within an adp. (e.g. everything within TRN tags)

- These changes will be stored in the database (the original englisch text with a mandatory locale beeing the primary key). Once a change has been made, all files (which we gather from the table, see above), will be changed or created (with the locale added like foo_de.adp). The database keeps track of the changes.

- Create a script that sweeps through the file system and checks, if .adp files (without locale information) have been changed. If yes, inform the locale administrators about this so they have the possibility of updateing their locale (I think this will happen when the .adp files are changed for layout reasons).

- If we have a system in place for changing foo.adp files via OACS instead of SSH, we could add a flag stating "Only design was changed". If this is set to true, change all locale adp files (for the changed file, e.g. foo_de.adp, foo_cz.adp) automatically.

- I just realized we might think about a different seperator than "_" as this is part of locale Definitions (e.g. de_DE or de_CH).

- This would us allow to have a different layout depending on locale, if you want to drive this even further.

- Last but not least, the request processor checks first if a locale for this user is available and deliver the one according to the rules (remember the discussion we had in amsterdam).

So long and thanks for all the fish

Malte