|
Posted by Jarle Aase on 11/23/06 17:58
Hi,
I wrote a multilanguage cms system a few years ago. Different languages are
handled by loading php-files where each language-specific string is
assigned to a normal php-variable ($LNG[] array).
This loading takes place for each request.
Now I'm developing a backend server in C++ that will allow some better
security-checking, session management and caching. The backend server has a
companion php extension module.
I want to make as few changes in the .php files as possible. Several
companies has used and extended the cms system, and if I change the cms's
API, they will have to hire programmers to update their code.
To make it easy to maintain the system, I want the language-texts to be
stored in a MySQL database. I want the backend server to handle this table,
and feed all the texts to the extension module when it starts up (one copy
pr. process or in shared memory - that is not important).
So - my question is: How is the best way to implement static global
variables in the extension module, without affecting the cms systems API?
(Today the .php files use the $LNG[whatever] syntax to get a language text
string.)
Jarle
--
Jarle Aase http://www.jgaa.com
mailto:jgaa@jgaa.com
<<< no need to argue - just kill'em all! >>>
Navigation:
[Reply to this message]
|