Works with the AI Agents you already use

    React RTL & Arabic Localization (i18n)

    by Mahmoud Sabry

    1

    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

    Security scanned
    React RTL & Arabic Localization (i18n)

    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

    SeverityAreaFile:lineProblemFix
    MajorDirectioncomponents/Card.tsx:4dir="rtl" hard-coded on a wrapperSet dir on <html> from the active locale
    MajorTailwindcomponents/Card.tsx:4ml-4 pr-2 md:mr-6 text-left border-r-2ms-4 pe-2 md:me-6 text-start border-e-2
    MajorTailwindcomponents/Card.tsx:9left-0 right-[10px]start-0 end-[10px]
    MajorInline stylecomponents/Card.tsx:6marginLeft, left: 0, textAlign: 'right'marginInlineStart, insetInlineStart: 0, textAlign: 'end'
    Majori18ncomponents/Card.tsx:5t('hello') + name breaks Arabic word ordert('hello', { name })
    MajorFormattingcomponents/Card.tsx:8toLocaleDateString() with no localeIntl.DateTimeFormat(locale, { dateStyle: 'long' })
    MajorCSSstyles.css:1-2margin-left, padding-right, text-align: left, left: 0, border-left, float: rightLogical properties (margin-inline-start, inset-inline-start, text-align: start...)
    MajorTailwind @applystyles.css:4ml-2 text-rightms-2 text-end
    MinorFormattingcomponents/Card.tsx:6price.toFixed(2)Intl.NumberFormat with currency
    MinorMotioncomponents/Card.tsx:7translate-x-4 does not flipadd rtl:-translate-x-4
    MinorTypographystyles.css:2, Card.tsx:7letter-spacing / tracking-wide breaks joined Arabic scriptreset 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

    1. Move dir and lang to <html> with a getDir(locale) helper.
    2. Convert the Tailwind and CSS findings to logical utilities (English layout stays identical).
    3. Replace concatenation and unlocalized number/date formatting with i18next interpolation and Intl.

    Shall I apply steps 1-3 now?

    Card.tsx

    TSX · React component

    Generated

    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> 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.

    How to use

    1. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Read Files
    Write Files
    Listed5 days ago

    What's inside

    Frequently Asked Questions

    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.

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

    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.

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

    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.

    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.

    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.

    Free