Add EN/UK/PL translations across index, footer, and why-ours pages

- index.php: translate hardcoded hero kicker, stat, explore CTA, tools
  section title/sub, and learn-more arrow; add Pricing nav link
- footer.php: fully translate tagline, privacy note, nav links, and
  disclaimer into all 4 languages via dbnToolsT()
- includes/i18n.php: 15 new keys per language (hero_kicker, footer_*,
  tools_section_*, pricing_nav_link, why_ours_trust_link, learn_more)
- translations/why-ours.php: complete uk + pl translations (70 keys each)
- assets/css/tools.css: add .lt-nav__secondary-link style

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-21 07:48:40 +02:00
parent abdad0f7e3
commit 7edc42c483
5 changed files with 291 additions and 19 deletions
+10 -8
View File
@@ -90,6 +90,7 @@ window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
<span class="lt-nav__badge">Legal Tools</span>
</a>
<div class="lt-nav__right">
<a href="/pricing.php<?= $uiLang !== 'en' ? '?lang=' . urlencode($uiLang) : '' ?>" class="lt-nav__secondary-link"><?= htmlspecialchars(dbnToolsT('pricing_nav_link', $uiLang)) ?></a>
<nav class="shell-lang-switcher" aria-label="Language">
<?php foreach (dbnToolsSupportedLanguages() as $langCode): ?>
<a href="<?= htmlspecialchars($langPath . '?lang=' . $langCode . '&return=' . urlencode($returnPath)) ?>" class="<?= $langCode === $uiLang ? 'is-active' : '' ?>"><?= htmlspecialchars(dbnToolsLanguageLabel($langCode)) ?></a>
@@ -108,7 +109,7 @@ window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
<section class="lt-hero">
<div class="lt-hero__inner">
<p class="lt-hero__kicker">AI Legal Tools &middot; Norway &middot; Free for members</p>
<p class="lt-hero__kicker"><?= htmlspecialchars(dbnToolsT('hero_kicker', $uiLang)) ?></p>
<h1 class="lt-hero__title"><?= htmlspecialchars(dbnToolsT('landing_title', $uiLang)) ?></h1>
<p class="lt-hero__body"><?= htmlspecialchars(dbnToolsT('landing_sub', $uiLang)) ?></p>
<div class="lt-hero__stats">
@@ -126,7 +127,7 @@ window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
</div>
<div class="lt-hero__stat">
<strong>220K</strong>
<span>Legal passages indexed</span>
<span><?= htmlspecialchars(dbnToolsT('stat_passages_indexed', $uiLang)) ?></span>
</div>
</div>
<?php if ($isAuthed): ?>
@@ -136,7 +137,7 @@ window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
<a href="/dashboard.php" class="lt-hero__enter-btn"><?= htmlspecialchars(dbnToolsT('enter_workbench', $uiLang)) ?> &rarr;</a>
</div>
<?php else: ?>
<a href="#tools" class="lt-hero__cta-link">Explore tools &#x2193;</a>
<a href="#tools" class="lt-hero__cta-link"><?= htmlspecialchars(dbnToolsT('explore_tools', $uiLang)) ?></a>
<?php endif; ?>
</div>
</section>
@@ -144,8 +145,8 @@ window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
<section class="lt-tools" id="tools">
<div class="lt-tools__header">
<p class="lt-tools__eyebrow"><?= htmlspecialchars(dbnToolsT('tools_title', $uiLang)) ?></p>
<h2 class="lt-tools__title">Built for families navigating a complex system.</h2>
<p class="lt-tools__sub">Seven purpose-built AI tools &mdash; from audio transcription to deep legal research. Every tool processes your documents in memory and discards them when you&rsquo;re done.</p>
<h2 class="lt-tools__title"><?= htmlspecialchars(dbnToolsT('tools_section_title', $uiLang)) ?></h2>
<p class="lt-tools__sub"><?= htmlspecialchars(dbnToolsT('tools_section_sub', $uiLang)) ?></p>
</div>
<div class="lt-grid">
<a class="lt-card lt-card--workbench" href="<?= $isAuthed ? '/workbench.php' : '#access' ?>" data-tool="workbench">
@@ -168,7 +169,7 @@ window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
<p class="lt-card__badge"><?= htmlspecialchars($item['badge']) ?></p>
<h3 class="lt-card__title"><?= htmlspecialchars($item['label']) ?></h3>
<p class="lt-card__desc"><?= htmlspecialchars($item['description']) ?></p>
<span class="lt-card__arrow">Learn more &#x2192;</span>
<span class="lt-card__arrow"><?= htmlspecialchars(dbnToolsT('learn_more', $uiLang)) ?></span>
</div>
</a>
<?php endforeach; ?>
@@ -195,8 +196,9 @@ window.DBN_TOOLS_LANG = <?= json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>;
<p><?= htmlspecialchars(dbnToolsT('source_text', $uiLang)) ?></p>
</div>
</div>
<div style="text-align:center;margin-top:2rem">
<a href="/why-ours.php" style="display:inline-block;padding:.6rem 1.4rem;border:1.5px solid rgba(0,32,91,.25);border-radius:8px;font-size:.85rem;font-weight:600;color:var(--dbn-blue,#00205b);text-decoration:none;transition:border-color .2s,background .2s" onmouseover="this.style.background='rgba(0,32,91,.05)'" onmouseout="this.style.background=''">Why our tools give different answers than ChatGPT &rarr;</a>
<div style="text-align:center;margin-top:2rem;display:flex;flex-wrap:wrap;gap:.75rem;justify-content:center">
<a href="/why-ours.php<?= $uiLang !== 'en' ? '?lang=' . urlencode($uiLang) : '' ?>" style="display:inline-block;padding:.6rem 1.4rem;border:1.5px solid rgba(0,32,91,.25);border-radius:8px;font-size:.85rem;font-weight:600;color:var(--dbn-blue,#00205b);text-decoration:none;transition:border-color .2s,background .2s" onmouseover="this.style.background='rgba(0,32,91,.05)'" onmouseout="this.style.background=''"><?= htmlspecialchars(dbnToolsT('why_ours_trust_link', $uiLang)) ?></a>
<a href="/pricing.php<?= $uiLang !== 'en' ? '?lang=' . urlencode($uiLang) : '' ?>" style="display:inline-block;padding:.6rem 1.4rem;border:1.5px solid rgba(0,32,91,.25);border-radius:8px;font-size:.85rem;font-weight:600;color:var(--dbn-blue,#00205b);text-decoration:none;transition:border-color .2s,background .2s" onmouseover="this.style.background='rgba(0,32,91,.05)'" onmouseout="this.style.background=''"><?= htmlspecialchars(dbnToolsT('pricing_nav_link', $uiLang)) ?></a>
</div>
</section>