register_hook('MENU_ITEMS_ASSEMBLY', 'AFTER', $this, 'handleMenuAssembly'); $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handlePreprocess'); $controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE', $this, 'handleUnknown'); // Register the built-in interface language toggle. $controller->register_hook( helper_plugin_usersettings::REGISTER_EVENT, 'BEFORE', $this, 'registerLangToggle' ); // Apply the user's language choice as early as possible so that all // DokuWiki rendering — including TPL_ hooks further down the chain — // uses the right language strings. ACTION_ACT_PREPROCESS fires before // any output is produced and before template rendering begins. $controller->register_hook( 'ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'applyUserLang', null, // run at priority -10 so we fire before handlePreprocess (0) and // before anything else that might read $conf['lang'] -10 ); // js.php is its own request and runs with NOSESSION, so it has no // REMOTE_USER and ACTION_ACT_PREPROCESS never fires for it. We therefore // carry the user's language to js.php through the