Translate debug info

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
SpIdErPiGgY
Registered User
Posts: 241
Joined: Sun May 02, 2021 2:11 pm
Location: Erpe-Mere, Aalst, BE
Name: Andy Dm

Translate debug info

Post by SpIdErPiGgY »

I see that the debug info is hardcoded in phpbb.
so it can't be translated in other languages.
Is it possible to change this?

/includes/functions.php

Code: Select all

	// Output page creation time
	if ($phpbb_container->getParameter('debug.load_time'))
	{
		if (isset($GLOBALS['starttime']))
		{
			$totaltime = microtime(true) - $GLOBALS['starttime'];
			$debug_info[] = sprintf('<span title="SQL time: %.3fs / PHP time: %.3fs">Time: %.3fs</span>', $db->get_sql_time(), ($totaltime - $db->get_sql_time()), $totaltime);
		}
	}

	if ($phpbb_container->getParameter('debug.memory'))
	{
		$memory_usage = memory_get_peak_usage();
		if ($memory_usage)
		{
			$memory_usage = get_formatted_filesize($memory_usage);

			$debug_info[] = 'Peak Memory Usage: ' . $memory_usage;
		}

		$debug_info[] = 'GZIP: ' . (($config['gzip_compress'] && @extension_loaded('zlib')) ? 'On' : 'Off');

		if ($user->load)
		{
			$debug_info[] = 'Load: ' . $user->load;
		}
	}

	if ($phpbb_container->getParameter('debug.sql_explain'))
	{
		$debug_info[] = sprintf('<span title="Cached: %d">Queries: %d</span>', $db->sql_num_queries(true), $db->sql_num_queries());

		if ($auth->acl_get('a_'))
		{
			$debug_info[] = '<a href="' . build_url() . '&amp;explain=1">SQL Explain</a>';
		}
	}
The same with the "SQL report", I would also like that info in Dutch language...

Maybe overwrite the above code with an extension.
I can do that myself, just need some help on how to overwrite core php...
phpBB NL Extension translations, also on request.
--> Click Here: Myarea51secrets.com <--

Return to “[3.3.x] Support Forum”