- Home
- Skills
- Frontend & Web Apps
- React RTL & Arabic Localization (i18n)
Works with the AI Agents you already use
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.
Free
React RTL & Arabic Localization (i18n)
Example session with this skill installed
Scan ./src for RTL problems before we add Arabic. The app uses React with Tailwind.
- Read your context and instructions
- Compiled the react rtl
- Generated the UI component
Summary
Ran the bundled scanner on ./src (2 files, a small sample component plus a stylesheet). Found
26 RTL issues: 21 major, 5 minor. The biggest risks are a hard-coded dir="rtl" on an inner element, physical Tailwind spacing, and a translated string built by concatenation.
Findings
| Severity | Area | File:line | Problem | Fix |
|---|---|---|---|---|
| Major | Direction | components/Card.tsx:4 | dir="rtl" hard-coded on a wrapper | Set dir on <html> from the active locale |
| Major | Tailwind | components/Card.tsx:4 | ml-4 pr-2 md:mr-6 text-left border-r-2 | ms-4 pe-2 md:me-6 text-start border-e-2 |
| Major | Tailwind | components/Card.tsx:9 | left-0 right-[10px] | start-0 end-[10px] |
| Major | Inline style | components/Card.tsx:6 | marginLeft, left: 0, textAlign: 'right' | marginInlineStart, insetInlineStart: 0, textAlign: 'end' |
| Major | i18n | components/Card.tsx:5 | t('hello') + name breaks Arabic word order | t('hello', { name }) |
| Major | Formatting | components/Card.tsx:8 | toLocaleDateString() with no locale | Intl.DateTimeFormat(locale, { dateStyle: 'long' }) |
| Major | CSS | styles.css:1-2 | margin-left, padding-right, text-align: left, left: 0, border-left, float: right | Logical properties (margin-inline-start, inset-inline-start, text-align: start...) |
| Major | Tailwind @apply | styles.css:4 | ml-2 text-right | ms-2 text-end |
| Minor | Formatting | components/Card.tsx:6 | price.toFixed(2) | Intl.NumberFormat with currency |
| Minor | Motion | components/Card.tsx:7 | translate-x-4 does not flip | add rtl:-translate-x-4 |
| Minor | Typography | styles.css:2, Card.tsx:7 | letter-spacing / tracking-wide breaks joined Arabic script | reset for Arabic |
Skipped on purpose: ms-4 pe-2 text-start (already logical), a line marked rtl-ok, and everything in node_modules.
Next steps
- Move
dirandlangto<html>with agetDir(locale)helper. - Convert the Tailwind and CSS findings to logical utilities (English layout stays identical).
- Replace concatenation and unlocalized number/date formatting with i18next interpolation and
Intl.
Shall I apply steps 1-3 now?
Card.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
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>anddir="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
- Detect Stack: The agent identifies your framework, styling library, and existing i18n setup to ensure compatible code generation.
- Static Scan: It runs a Python-based scanner to find every instance of physical spacing, alignment, and directional logic.
- Refactor: The agent applies fixes in sequence, starting with root direction, then i18n logic, and finally CSS/Tailwind utilities.
- 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.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
Nothing to install. It runs in your AI agent.
- Optional
Python 3 (for the RTL scanner)
Permissions
What's inside
Frequently Asked Questions
New in Frontend & Web Apps
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Frontend & Web Apps.