<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: webinOO</title>
    <description>The latest articles on DEV Community by webinOO (@webinoo).</description>
    <link>https://dev.to/webinoo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4273077%2Fb4c91755-b49d-4561-94f1-a592508b1d21.png</url>
      <title>DEV Community: webinOO</title>
      <link>https://dev.to/webinoo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/webinoo"/>
    <language>en</language>
    <item>
      <title>Building a bilingual Arabic and English site with Astro: RTL, fonts, and SEO notes</title>
      <dc:creator>webinOO</dc:creator>
      <pubDate>Sun, 29 Nov 2026 23:35:13 +0000</pubDate>
      <link>https://dev.to/webinoo/building-a-bilingual-arabic-and-english-site-with-astro-rtl-fonts-and-seo-notes-586m</link>
      <guid>https://dev.to/webinoo/building-a-bilingual-arabic-and-english-site-with-astro-rtl-fonts-and-seo-notes-586m</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. RTL is a layout decision, not a translation
&lt;/h2&gt;

&lt;p&gt;Arabic is right-to-left, so the whole layout mirrors: navigation, icons, breadcrumbs, even image carousels. The cleanest approach I found:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ar"&lt;/span&gt; &lt;span class="na"&gt;dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"rtl"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;h2&gt;
  
  
  2. Fonts: Arabic first, then Latin
&lt;/h2&gt;

&lt;p&gt;Arabic glyphs need a font that actually covers them. I load an Arabic webfont (IBM Plex Sans Arabic works well) and a Latin font, and stack them so Latin characters fall through to the Latin font inside Arabic pages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'IBM Plex Sans Arabic'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Inter'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Self-host both. It avoids a render flash and keeps the Largest Contentful Paint stable, which matters for Core Web Vitals.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. hreflang is not optional
&lt;/h2&gt;

&lt;p&gt;For each page pair, emit reciprocal &lt;code&gt;hreflang&lt;/code&gt; links (&lt;code&gt;ar&lt;/code&gt;, &lt;code&gt;en&lt;/code&gt;, and &lt;code&gt;x-default&lt;/code&gt;). Search engines mix up Arabic and English versions constantly without them, and the wrong language ranks for the wrong query. In Astro I generate these from a shared route map so the two versions can never drift apart.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Arabic slugs vs English slugs
&lt;/h2&gt;

&lt;p&gt;I keep URLs in English for both locales (&lt;code&gt;/en/services/...&lt;/code&gt;, &lt;code&gt;/ar/services/...&lt;/code&gt;). Arabic slugs get percent-encoded into unreadable strings in shares and reports, and support tools handle ASCII paths more predictably.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Numbers, dates, and mixed-direction text
&lt;/h2&gt;

&lt;p&gt;Phone numbers and prices inside Arabic paragraphs are the classic bidirectional-text trap. Wrap them in &lt;code&gt;&amp;lt;bdi&amp;gt;&lt;/code&gt; or a &lt;code&gt;dir="ltr"&lt;/code&gt; span so they render in the right order. Also decide per project whether to use Western (0-9) or Eastern Arabic (٠-٩) numerals and stay consistent; Kuwaiti business sites mostly use Western numerals.&lt;/p&gt;




&lt;p&gt;These notes come from client work I publish under &lt;a href="https://webinoo.online" rel="noopener noreferrer"&gt;webinOO&lt;/a&gt;. If you maintain a bilingual site, I would be curious what bit you: fonts, RTL layouts, or search engines picking the wrong language?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>astro</category>
      <category>arabic</category>
      <category>seo</category>
    </item>
  </channel>
</rss>
