multilang-static-kit

Pieces for static multilingual sites with RTL locales. Source and docs: github.com/bagdaer1/multilang-static-kit. Running in production on Batumi Casino Guide (6 locales, 200+ URLs).

1. Language switcher — no JS, mirrors in RTL

Same component, three headers. Click the globe. Try keyboard: Tab, Enter, Esc.

Site · English page
EN
Call to action
אתר · עמוד בעברית
HE
קריאה לפעולה
الموقع · صفحة بالعربية
AR
دعوة إلى الإجراء

2. hreflang only for pages that exist

For /he/guides/poker/ when the Chinese locale has no such page: zh is omitted from the alternates, and the switcher sends zh visitors to /zh/guides/ instead of a 404.

<link rel="alternate" hreflang="en" href="https://example.com/en/guides/poker/">
<link rel="alternate" hreflang="ru" href="https://example.com/ru/guides/poker/">
<link rel="alternate" hreflang="tr" href="https://example.com/tr/guides/poker/">
<link rel="alternate" hreflang="he" href="https://example.com/he/guides/poker/">
<link rel="alternate" hreflang="ar" href="https://example.com/ar/guides/poker/">
<link rel="alternate" hreflang="x-default" href="https://example.com/en/guides/poker/">

3. Numbers from data, per locale

Copy says ⟦RATINGS⟧ · ⟦BC⟧; the build fills it from the record in each locale's own wording. A leftover marker fails the build.

localeoutput
enGoogle 4.4 (359 reviews), Tripadvisor 4.0 (29 reviews), 2GIS 4.0 (2 reviews) · 8.2
ruGoogle 4.4 (оценок: 359), Tripadvisor 4.0 (оценок: 29), 2ГИС 4.0 (оценок: 2) · 8.2
heGoogle 4.4 (359 דירוגים), Tripadvisor 4.0 (29 דירוגים), 2GIS 4.0 (2 דירוגים) · 8.2
arGoogle 4.4 (359 تقييماً)، Tripadvisor 4.0 (29 تقييماً)، 2GIS 4.0 (2 تقييماً) · 8.2
zh谷歌 4.4(359 条评价)、Tripadvisor 4.0(29 条评价)、2GIS 4.0(2 条评价) · 8.2

4. Root language gate

The site root detects the device language once, remembers the choice, links every locale for crawlers and is noindex, follow. Inner pages never redirect. See kit/langgate.html.

MIT licence. Built for batumicasino.net; open data from that project: casinos of Batumi, CSV/JSON.