You all know my feelings on editing files, and currently the language editor does just that - even for plugins (eek), and right now it's broken. So it needs an overhaul.
So here's what I was thinking. How about, we store the changed strings in the database and load them when necessary? That sounds awful, but let me temper it with this which only occurred to me today.
We know what files contain what strings, and we know what file is being edited at any one time. So if we keep a record of what strings have been modified in the DB versus the original files, we can add a check to loadLanguage to say 'look, we've asked for <language file x>, has there been any changes to that file?' then load any changes to it after the fact, as it were.
All we then need is a DB table containing language, file, optional plugin ID, and the new string and we're golden. Plus if a given file hasn't been updated, no harm, no foul (and no extra query)
This way we get to allow language strings to be edited (cleanly), without any file edits (which is also a security improvement). I'd also move the registration agreement into the language files too and have them all supported in one clean place.
Thoughts?
So here's what I was thinking. How about, we store the changed strings in the database and load them when necessary? That sounds awful, but let me temper it with this which only occurred to me today.
We know what files contain what strings, and we know what file is being edited at any one time. So if we keep a record of what strings have been modified in the DB versus the original files, we can add a check to loadLanguage to say 'look, we've asked for <language file x>, has there been any changes to that file?' then load any changes to it after the fact, as it were.
All we then need is a DB table containing language, file, optional plugin ID, and the new string and we're golden. Plus if a given file hasn't been updated, no harm, no foul (and no extra query)
This way we get to allow language strings to be edited (cleanly), without any file edits (which is also a security improvement). I'd also move the registration agreement into the language files too and have them all supported in one clean place.
Thoughts?