I think the layout.php template is wrong. It echoed lang attribute only if the language is rtl.
// node_modules\@phpmaker\php2024\layout.php
<html<?= IsRTL() ? ' lang="' . CurrentLanguageID() . '" dir="rtl"' : '' ?> data-bs-theme="light">
I think the layout.php template is wrong. It echoed lang attribute only if the language is rtl.
// node_modules\@phpmaker\php2024\layout.php
<html<?= IsRTL() ? ' lang="' . CurrentLanguageID() . '" dir="rtl"' : '' ?> data-bs-theme="light">
I think Chrome, in the absence of lang attribute, consider the page is in en and offering to translate the page to browser's language. I've seen my users clicked on that offering and make some phrases looks funny.
My app is in id language. In id language field caption "No" is short for "Nomor".
My users usually, being Indonesian, usually set their browser's language to Bahasa. When they clicked the offering to translate the page field caption "No" is translated to "Tidak".
So I think it's better to set lang attribute to avoid that offering by browser.
With the advancement of AI, I believe translation offering will soon become the norm, if not yet already, for all browsers.
Hence the need to literally define lang attribute in html tag.