I want to be able to call a function, that will set one or more local variables in the calling function. For instance:
function someFunc () {
loadTranslatedStrings($LOCALS, "spanish");
echo $hello; // prints "hola";
}
function loadTranslatedStrings (&$callerLocals, $lang) {
if ($lang == 'spanish')
$callerLocals['hello'] = 'hola';
else if ($lang == 'french')
$callerLocals['hello'] = 'bonjour';
else
$callerLocals['hello'] = 'hello';
}
(I'm guessing it is impossible to do this, but might as well ask...)