# React RTL & Arabic Localization (i18n)

> Turn any React app into a correct Arabic / RTL experience - audit, fix and verify direction, layout, icons, mixed text, fonts, numbers, dates and plurals.

React RTL & Arabic Localization (i18n) is a free AI agent skill on Agensi by Mahmoud Sabry, in Frontend & Web Apps. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Mahmoud Sabry](https://www.agensi.io/creators/mahmoud-sabry)
- Category: [Frontend & Web Apps](https://www.agensi.io/skills/frontend-web-apps)
- Version: 1.0
- Last updated: 2026-11-30
- Security: scan passed (2026-11-30); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/react-rtl-arabic-localization-i18n
- Tags: react, nextjs, rtl, arabic, i18n, localization, tailwind, css

## About this skill

Supporting Arabic or Hebrew in a React app involves more than just translating text. Layouts break, icons point the wrong way, and mixed-direction text creates unreadable UI. This skill systematically audits and refactors React, Next.js, and Vite applications to support right-to-left (RTL) languages properly. It replaces brittle physical CSS with logical properties, configures complex Arabic pluralization rules, and handles bidirectional text isolation for data like phone numbers and URLs.

### What it does
- **Automated RTL Audit** identifies physical CSS properties, hard-coded directions, and locale-unsafe date or number formatting.
- **Logical Property Conversion** refactors Tailwind, CSS Modules, or Styled Components from physical (left/right) to logical (start/end) values.
- **i18n Infrastructure** sets up i18next or next-intl with full support for the six Arabic plural forms and Intl-based formatting.
- **Bidi Text Isolation** implements `<bdi>` and `dir="auto"` to prevent UI corruption when mixing Arabic and English text.
- **Icon Mirroring** identifies and flips directional icons while preserving static symbols like logos and media controls.
- **Typography Optimization** configures Arabic-specific fonts and adjusts line-heights to prevent vertical clipping.

### How it works
1. **Detect Stack**: The agent identifies your framework, styling library, and existing i18n setup to ensure compatible code generation.
2. **Static Scan**: It runs a Python-based scanner to find every instance of physical spacing, alignment, and directional logic.
3. **Refactor**: The agent applies fixes in sequence, starting with root direction, then i18n logic, and finally CSS/Tailwind utilities.
4. **Verification**: It runs a QA checklist to ensure the English (LTR) layout remains pixel-identical while the Arabic layout is correct.

### Frameworks & tools
React, Next.js (App and Pages router), Vite, Remix, Tailwind CSS, CSS Modules, Styled Components, Emotion, i18next, next-intl, MUI, Ant Design, and shadcn/ui.

### Why this beats prompting it yourself
Prompting a generic LLM often results in hard-coded `dir="rtl"` hacks that break nested layouts or mirror the wrong icons. This skill follows a strict order of operations and uses a specialized scanner to ensure no physical CSS property is missed, maintaining a single codebase for all locales.

### Use cases
- Add Arabic or Hebrew support to an existing English-only Next.js application.
- Fix layout bugs where UI elements overlap or align incorrectly in RTL mode.
- Migrate a large Tailwind project from physical utilities to logical properties.
- Implement complex Arabic pluralization and RTL-safe form inputs.

### Known limitations
Does not support React Native (requires I18nManager). The static scanner requires Python 3 for automated detection. Manual verification is required for machine-translated UI strings.

## Requires

- Optional: Python 3 (for the RTL scanner)

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the React RTL & Arabic Localization (i18n) skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill handle UI elements that break when switching from LTR to RTL?

This skill replaces physical CSS properties with logical ones, configures complex Arabic pluralization rules, and handles bidirectional text isolation to prevent UI corruption in mixed-language layouts.

### Which React frameworks and styling libraries are compatible with this skill?

It supports React, Next.js, Vite, and Remix, along with styling libraries like Tailwind CSS, CSS Modules, Styled Components, and Emotion.

### Will applying these RTL refactors break my existing English (LTR) layout?

The skill performs a 'pixel-identical' verification check to ensure that all logical property changes preserve the original English layout while enabling the correct Arabic layout.

### Can this skill be used to add i18n support to a project that doesn't have it yet?

Yes, the skill is designed to integrate seamlessly with i18next and next-intl, setting up the necessary infrastructure for Arabic-specific formatting and pluralization.

### What makes this better than manually prompting an LLM to 'make my app RTL'?

Unlike generic prompts, this skill uses a specialized static scanner to ensure no physical CSS properties are missed and follows a strict order of operations to avoid common 'RTL hacks' that break nested layouts.

### Are there any specific technical requirements or limitations I should be aware of?

The skill requires a project environment with Python 3 for the automated scanning phase and currently focuses on web-based React applications, excluding React Native.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
