Add translation support for FAQ summary and answer links

Use translations for FAQ summary label and read full answer button text
while falling back to default Norwegian text if translations are not
available
This commit is contained in:
Ruben 2025-11-30 00:08:22 +01:00
parent 4280527049
commit cab5b17506

View file

@ -14,9 +14,9 @@
</summary>
<div class="faq-content">
<?php if ($item['summary']): ?>
<p><strong>Kort oppsumert:</strong> <?= htmlspecialchars($item['summary']) ?></p>
<p><strong><?= htmlspecialchars($translations['faq_summary_label'] ?? 'Kort oppsumert:') ?></strong> <?= htmlspecialchars($item['summary']) ?></p>
<?php endif; ?>
<a href="<?= htmlspecialchars($item['url']) ?>" class="button">Les hele svaret</a>
<a href="<?= htmlspecialchars($item['url']) ?>" class="button"><?= htmlspecialchars($translations['faq_read_full_answer'] ?? 'Les hele svaret') ?></a>
</div>
</details>
<?php endforeach; ?>