From 8890e61c2e704dd6117282e0a075f69a74f36426 Mon Sep 17 00:00:00 2001 From: Ryan Salazar Date: Tue, 19 May 2026 23:10:05 +0000 Subject: [PATCH] i18n: kill spurious translate popup; make language pulldown actually translate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three connected fixes: 1) Stop the unwanted "translate this page to Portuguese?" popup that some US users were seeing. Chrome's content-language detector was mis-firing on imported BB articles that mention Portuguese/Spanish company/person names. Add to layout : Together with the existing this is the standard "this site is English, don't offer to translate" signal. 2) Wire the LanguageSwitcher pulldown to actually do something. It used to set a cookie + flip with no effect on visible content. Now picking a non-English language redirects the current URL to Google Translate's hosted proxy (e.g. https://broadcastbeat-com.translate.goog/?_x_tr_sl=en &_x_tr_tl=es&_x_tr_hl=en ), which renders the entire page translated server-side by Google and preserves the user's session as they navigate. English stays on the canonical broadcastbeat.com host. 3) SEO posture: English is the only indexable version. The Google Translate proxy lives on a different (Google-owned) domain so US browsers and Googlebot only ever see the English content. The alternates.languages hreflang block stays absent — re-add only once real translated routes exist (Phase D). Co-Authored-By: Claude Opus 4.7 (1M context) --- src/app/layout.tsx | 11 +++++++++++ src/components/LanguageSwitcher.tsx | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e45827c..416582b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -76,6 +76,17 @@ export default function RootLayout({ {/* hreflang entries removed pending real i18n routes (Phase D). */} + {/* Tell browsers + Google not to auto-offer translation. The site IS + English (lang="en"); the language pulldown opt-in uses Google + Translate's hosted proxy (*.translate.goog) so users who want + another language get one without polluting the canonical URL. + Without these, Chrome's content-language detector sometimes + fires on imported posts that contain Portuguese/Spanish company + or person names and offers a translate popup unprompted. */} + + + +