On Tuesday, September 30, 2003, at 02:38 AM, Paul L. Allen wrote:
Ideally it would not read in the English file (unless you happen to be
English) unless it encounters a message for which there is no translation
(that would make the code a little faster in most cases). If there is
no translation then it reads in the English file once and uses it whenever
it finds a message in the template for which there is no translation in
the current language file.

I already have plans for a rewrite of the code that reads in language files.


Right now, for every string requested from the file, QmailAdmin scans the entire file looking for it. My plan is to read the entire file into memory, scan it once and set pointers to each string (converting the newlines to nulls). This scanning process won't take much longer than searching for a string at the end of the file.

To allow for new strings, it will read in the English file as well, and set pointers into it for any string not present in the requested language.

--
Tom Collins
[EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/




Reply via email to