From 45b4248662cc75f253d8bf34bc63592a96cba46f Mon Sep 17 00:00:00 2001 From: Ole-Morten Duesund Date: Mon, 8 Sep 2025 13:14:50 +0200 Subject: [PATCH] Add comprehensive i18n support for Norwegian and English MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add language toggle button with EN/NO options in top-right corner - Implement complete translation system with localStorage persistence - Add proper Norwegian translations with correct capitalization - Support real-time language switching without page reload - Integrate translations with GDPR consent system and notifications - Update all UI text, modal content, and status messages - Fix JavaScript syntax errors with escaped apostrophes - Follow Norwegian writing conventions for compound words Features: • Language preference persisted between visits • All content translates instantly when switching • Modal consent flow fully localized • Button text and notifications use selected language • HTML lang attribute updates for accessibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- index.html | 227 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 219 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 21ce628..363f2dd 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + @@ -152,6 +152,45 @@ background: #ff9800; } + .language-toggle { + position: fixed; + top: 20px; + right: 20px; + background: rgba(255, 255, 255, 0.9); + backdrop-filter: blur(10px); + padding: 8px; + border-radius: 20px; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); + z-index: 998; + display: flex; + gap: 4px; + } + + .lang-btn { + padding: 6px 12px; + border: none; + border-radius: 15px; + font-size: 12px; + font-weight: 600; + cursor: pointer; + transition: all 0.3s ease; + background: transparent; + color: #666; + } + + .lang-btn.active { + background: #667eea; + color: white; + } + + .lang-btn:hover { + background: rgba(102, 126, 234, 0.1); + } + + .lang-btn.active:hover { + background: #5a6fd8; + } + @media (max-width: 768px) { .hero h1 { font-size: 2.5rem; @@ -166,6 +205,10 @@ position: static; margin-bottom: 2rem; } + .language-toggle { + position: static; + margin-bottom: 1rem; + } } .tracking-consent-container { position: fixed; @@ -279,6 +322,11 @@ +
+ + +
+
Privacy Mode: Minimal Tracking @@ -378,6 +426,164 @@