One of the banes of my existence is writing MODX extras that will run inside and outside of MODX. Worse yet, sometimes they also run in a browser and from the command line.
In an earlier Article, I wrote about how to instantiate MODX outside of MODX. That makes things easier since you can use any MODX methods once you’ve instantiated the
$modx object, but what about the parts of the program that might run before that? If they display messages to the user (possibly error messages), you might like to use lexicon strings to internationalize those messages. Learn More