Menu

Building a bilingual Arabic and English site with Astro: RTL, fonts, and SEO notes
📰

Building a bilingual Arabic and English site with Astro: RTL, fonts, and SEO notes

DEV Community: astro·webinOO·7 days ago
#V7HIinqd
#devtoastro#devto#dev#arabic#latin
Long article (392 words) — no AI summary yet.
Reading 0:00
15s threshold

I build websites for businesses in Kuwait, and most of them need both Arabic and English versions. Here are the practical things that mattered when I moved my builds to Astro, in case they save you time.

1. RTL is a layout decision, not a translation

Arabic is right-to-left, so the whole layout mirrors: navigation, icons, breadcrumbs, even image carousels. The cleanest approach I found:

<html lang = "ar" dir = "rtl" >

Enter fullscreen mode

Exit fullscreen mode

Set dir at the document level per locale, then use logical CSS properties ( margin-inline-start , padding-inline-end , inset-inline-start ) instead of margin-left / right . With logical properties, one stylesheet serves both directions and you avoid a parallel set of RTL overrides.

2. Fonts: Arabic first, then Latin

Arabic glyphs need a font that actually covers them.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.