/** * Get output for a language variable (L_FOO, LA_FOO) * * This function checks to see if the language var was outputted to $context * (e.g. in the ACP, L_TITLE) * If not, we return the result of $user->lang() * * @return string */ function lang() { $args = func_get_args(); $key = $args[0]; $context = $this->context->get_data_ref(); $context_vars = $context['.'][0]; if (isset($context_vars['L_' . $key])) { return $context_vars['L_' . $key]; } // LA_ is transformed into lang(\'$1\')|addslashes, so we should not // need to check for it return call_user_func_array(array($this->user, 'lang'), $args); }