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:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user