<?php
	if (!isset($Lang) || $Lang === '')
		$Lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) ?? '';

	if ($Lang === $lang)
	{
		echo "<style>article [lang=en] { display: none; }</style>";
	}
	else
	{
		if (isset($Title) && $Title !== '')
			echo "<script>document.getElementsByTagName('h1')[0].innerHTML = '$Title';</script>";
		echo "<script>document.documentElement.setAttribute('lang', 'en');</script>";
		echo "<style>article [lang=$lang] { display: none; }</style>";
	}
?>
