# Publish Arabic and right-to-left documentation

> Create an Arabic page tree, connect real translations, and verify direction, mixed technical text, search, metadata, and mobile navigation.

Each Nibleaf language has its own page tree and direction. Arabic reader chrome
renders right to left while inline code and code blocks remain left to right.
Publish only real translations and connect the pages that are actual counterparts.

## Add the Arabic language

Open the page-tree language controls, add Arabic with the correct language code
and `rtl` direction, and decide which language is the default. An Arabic page
may use a different slug and location from its English counterpart.

Do not create empty translated copies just to make the trees match. Missing,
non-indexable, and external-canonical pages should not be advertised as a
reciprocal language cluster.

## Connect translations

Link each translated page to its actual counterpart. Nibleaf uses that explicit
relationship when generating `hreflang`; matching slugs are not required.

```text
English: /getting-started
Arabic:  /البدء
```

The initial HTML should agree on `lang`, `dir`, page title, description, Open
Graph locale, canonical, language alternates, and structured-data language.

## Test mixed technical text

Use a sentence containing Arabic prose, a command, a path, a query string, and
a version number:

```text
شغّل الأمر docker compose up -d، ثم افتح /docs?lang=ar وتأكد من الإصدار v0.1.2.
```

Check the line in Visual, Markdown, Preview, and the published reader. Copy the
command into a plain-text field to verify its logical order. Also check focus
order, previous/next arrows, breadcrumbs, the table of contents, nested sidebars,
font weights, mobile menus, long code blocks, and heading spacing.

## Verify Arabic search

Arabic projects index exact normalized fields and lower-weight morphology fields.
Both remove diacritics and tatweel, fold common alef forms, and map alef maqsura
to ya. The morphology lane then applies a conservative Lucene Light10-style
affix stemmer. Exact normalized tokens remain available and rank separately, so
stemming can add recall without replacing the original spelling signal.

This is not semantic retrieval, triliteral-root extraction, or general
lemmatization. Short tokens, code, mixed Arabic/Latin identifiers, and protected
ambiguous words are excluded from morphology processing. Exact phrases remain
the strongest signal; lexical, morphology, and bounded fuzzy lanes fill in
additional results.

Test words with and without diacritics, alef variants, tatweel, common prefixes
and suffixes, singular and plural forms, exact technical phrases, and product
terms written in Arabic and Latin script. Include negative queries that must not
match. Use real page vocabulary, not synthetic keyword lists.
