Impedisce l'auto-traduzione del browser e fissa il locale TH/EN esplicito.

Chrome traduceva il tailandese in inglese allo scroll; html translate=no e prop locale sulle route.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Javaxman
2026-07-30 11:39:27 +02:00
parent 04a1892c0d
commit ef343a31b5
5 changed files with 20 additions and 7 deletions

View File

@ -75,8 +75,11 @@ function measureHeaderAndSync(): void {
}
function bind(): void {
const path = window.location.pathname;
if (path !== '/' && path !== '/index.html') return;
const path = window.location.pathname.replace(/\/$/, '') || '/';
// Home IT (`/`) e home localizzate (`/en`, `/th`).
if (path !== '/' && path !== '/index.html' && path !== '/en' && path !== '/th') {
return;
}
const header = document.querySelector('header');
measureHeaderAndSync();