Files
Cell 5f1e79f49c feat(i18n): add RTL support for Arabic, Persian and Urdu (#831)
* feat(i18n): add RTL support and Arabic/Persian translations

- Add `dir` attribute to `<html>` via `.Site.Language.Direction`
- Convert physical CSS properties to logical properties across ~30 SCSS files
- Add `[dir="rtl"]` overrides for elements that need physical direction (code blocks, translate, icons)
- Add `logical-direction.html` template function for config value normalization
- Add RTL-aware deprecation warnings for old "left"/"right" config values
- Rename github corner, TOC position, reading progress config values from "left"/"right" to "start"/"end"
- Add Arabic (ar.toml) and Persian (fa.toml) i18n translation files
- Update multilingual documentation with RTL language configuration guide

* feat(shortcodes): add RTL support for tabs and refactor border-radius mixin

- Rename tabs placement values from "left"/"right" to "start"/"end" with deprecation warnings
- Convert all physical directional properties in tabs SCSS to logical properties
- Add RTL overrides for translate and box-shadow in tabs
- Add "start"/"end" support to border-radius mixin using CSS logical properties
- Refactor fixit-decryptor to use border-radius(start/end) mixin

* feat(assets): add RTL support for toc-dialog slide animation

The mobile toc-dialog always slid in from the right (100vw). In RTL
mode it should slide from the left (-100vw), matching the
border-inline-start/margin-inline-end anchoring.

* feat(assets): add RTL support for post-tag comma separator

* refactor(assets): extract RTL styles into dedicated _rtl.scss

* feat(assets): add RTL support for theme-switch and directional icons

* feat(i18n): add RTL support and improve i18n

- Add RTL typography corrections for Arabic-script languages (:lang(ar/fa/ur))
- Remove fa-list-ol from RTL flip list (numbers get mirrored)
- Add Urdu translation file (i18n/ur.toml)
- Rename noMoretTranslations to noTranslations and simplify all translations
- Update json-viewer-element from 1.0.4 to 1.0.6
- Add RTL test posts (index.en.md, index.ar.md)
- Fix layout partials for RTL support

See https://fixit.lruihao.cn/docs/content-management/introduction/#rtl-language-support
2026-08-24 00:22:34 +08:00

3.8 KiB

title, date, collections, categories, tags
title date collections categories tags
Arabic RTL Test 2026-08-23T10:00:00+08:00
Tests
Features
RTL
Arabic

A comprehensive test article for Arabic language and Right-to-Left layout support in the FixIt theme. This article tests various web elements with Arabic content.

Introduction

Welcome to this comprehensive test article. Arabic is one of the most widely spoken languages in the world, characterized by its Right-to-Left writing direction. Supporting this language in web designs requires special attention to many technical aspects.

Why RTL Matters

When designing websites that support Right-to-Left languages, we need to consider several factors:

  • Text direction: Text should flow naturally from right to left
  • Page layout: Elements should be arranged in a logical order
  • Symbols and icons: Some may need to be mirrored
  • Line spacing: Arabic text needs more space for diacritics

Mixed Text

This text contains English words like JavaScript, HTML, and CSS alongside Arabic text. Everything should display correctly.

Lists

Unordered lists:

  • First list item
  • Second list item
  • Third list item
    • Sub item
    • Another sub item

Ordered lists:

  1. First step in the process
  2. Second step
  3. Third and final step

Task lists:

  • Set up development environment
  • Write basic content
  • Test browser compatibility
  • Review final design
  • Deploy website

Tables

Language Direction Connected Letters
Arabic RTL Yes
Persian RTL Yes
Hebrew RTL No
English LTR No

Blockquotes

Knowledge is light and ignorance is darkness — Arabic proverb

Long quote:

Indeed, Allah does not change the condition of a people until they change what is in themselves

Icons

Icons that are flipped in RTL:

  • :(fa-solid fa-tag): Tag
  • :(fa-solid fa-tags): Tags
  • :(fa-solid fa-folder): Folder
  • :(fa-solid fa-folder-open): Folder Open
  • :(fa-solid fa-pen-to-square): Edit

Icons that are NOT flipped in RTL:

  • :(fa-solid fa-share): Share
  • :(fa-solid fa-search): Search

Tabs

{{< tabs >}} {{% tab title="First Tab" %}} Content of the first tab. {{% /tab %}} {{% tab title="Second Tab" %}} Content of the second tab. {{% /tab %}} {{< /tabs >}}

Collapsible Details

Click to show details

This is hidden content that can be expanded by clicking.

Content can be text, code, or any other element.

Alerts

{{< admonition >}} This is a regular admonition with useful information for the user. {{< /admonition >}}

Important

Make sure to test all changes before deploying.

Encrypted Content

{{< fixit-encryptor password="1212" message="Enter password (1212) to view content" >}} This is encrypted content. You must enter the password to view it. {{< /fixit-encryptor >}}

LTR Content Examples

In an RTL page, some elements remain in LTR direction because their content is purely linguistic or programmatic. Here are examples:

Code Block

#include <stdio.h>

int main() {
    printf("Hello, World!\n");
    return 0;
}

JSON Viewer

{
  "name": "FixIt",
  "version": "1.0.0",
  "features": ["RTL", "i18n", "shortcodes"]
}

Code Tabs

print("Python")
fmt.Println("Go")

Math

Simple equation: E = mc^2

Complex equation:

\sum_{i=1}^{n} i = \frac{n(n+1)}{2}

Mermaid Diagram

graph LR
    A[Start] --> B[Process]
    B --> C[End]

Created to test Arabic language support in the FixIt theme.